Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: src/compiler/pipeline.cc

Issue 2398603002: [turbofan][x64] Improve code generation for external reference access. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <memory> 8 #include <memory>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 1248
1249 struct InstructionSelectionPhase { 1249 struct InstructionSelectionPhase {
1250 static const char* phase_name() { return "select instructions"; } 1250 static const char* phase_name() { return "select instructions"; }
1251 1251
1252 void Run(PipelineData* data, Zone* temp_zone, Linkage* linkage) { 1252 void Run(PipelineData* data, Zone* temp_zone, Linkage* linkage) {
1253 InstructionSelector selector( 1253 InstructionSelector selector(
1254 temp_zone, data->graph()->NodeCount(), linkage, data->sequence(), 1254 temp_zone, data->graph()->NodeCount(), linkage, data->sequence(),
1255 data->schedule(), data->source_positions(), data->frame(), 1255 data->schedule(), data->source_positions(), data->frame(),
1256 data->info()->is_source_positions_enabled() 1256 data->info()->is_source_positions_enabled()
1257 ? InstructionSelector::kAllSourcePositions 1257 ? InstructionSelector::kAllSourcePositions
1258 : InstructionSelector::kCallSourcePositions); 1258 : InstructionSelector::kCallSourcePositions,
1259 InstructionSelector::SupportedFeatures(),
1260 FLAG_turbo_instruction_scheduling
1261 ? InstructionSelector::kEnableScheduling
1262 : InstructionSelector::kDisableScheduling,
1263 data->info()->will_serialize()
1264 ? InstructionSelector::kEnableSerialization
1265 : InstructionSelector::kDisableSerialization);
1259 if (!selector.SelectInstructions()) { 1266 if (!selector.SelectInstructions()) {
1260 data->set_compilation_failed(); 1267 data->set_compilation_failed();
1261 } 1268 }
1262 } 1269 }
1263 }; 1270 };
1264 1271
1265 1272
1266 struct MeetRegisterConstraintsPhase { 1273 struct MeetRegisterConstraintsPhase {
1267 static const char* phase_name() { return "meet register constraints"; } 1274 static const char* phase_name() { return "meet register constraints"; }
1268 1275
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 1661
1655 return ScheduleAndSelectInstructions(linkage); 1662 return ScheduleAndSelectInstructions(linkage);
1656 } 1663 }
1657 1664
1658 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate, 1665 Handle<Code> Pipeline::GenerateCodeForCodeStub(Isolate* isolate,
1659 CallDescriptor* call_descriptor, 1666 CallDescriptor* call_descriptor,
1660 Graph* graph, Schedule* schedule, 1667 Graph* graph, Schedule* schedule,
1661 Code::Flags flags, 1668 Code::Flags flags,
1662 const char* debug_name) { 1669 const char* debug_name) {
1663 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags); 1670 CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), flags);
1671 if (isolate->serializer_enabled()) info.PrepareForSerializing();
1664 1672
1665 // Construct a pipeline for scheduling and code generation. 1673 // Construct a pipeline for scheduling and code generation.
1666 ZonePool zone_pool(isolate->allocator()); 1674 ZonePool zone_pool(isolate->allocator());
1667 PipelineData data(&zone_pool, &info, graph, schedule); 1675 PipelineData data(&zone_pool, &info, graph, schedule);
1668 std::unique_ptr<PipelineStatistics> pipeline_statistics; 1676 std::unique_ptr<PipelineStatistics> pipeline_statistics;
1669 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { 1677 if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) {
1670 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_pool)); 1678 pipeline_statistics.reset(new PipelineStatistics(&info, &zone_pool));
1671 pipeline_statistics->BeginPhaseKind("stub codegen"); 1679 pipeline_statistics->BeginPhaseKind("stub codegen");
1672 } 1680 }
1673 1681
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 data->DeleteRegisterAllocationZone(); 1990 data->DeleteRegisterAllocationZone();
1983 } 1991 }
1984 1992
1985 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1993 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1986 1994
1987 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1995 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1988 1996
1989 } // namespace compiler 1997 } // namespace compiler
1990 } // namespace internal 1998 } // namespace internal
1991 } // namespace v8 1999 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698