OLD | NEW |
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 <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/base/adapters.h" | 10 #include "src/base/adapters.h" |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 | 1069 |
1070 // Remove dead->live edges from the graph. | 1070 // Remove dead->live edges from the graph. |
1071 Run<EarlyGraphTrimmingPhase>(); | 1071 Run<EarlyGraphTrimmingPhase>(); |
1072 RunPrintAndVerify("Early trimmed", true); | 1072 RunPrintAndVerify("Early trimmed", true); |
1073 | 1073 |
1074 if (FLAG_print_turbo_replay) { | 1074 if (FLAG_print_turbo_replay) { |
1075 // Print a replay of the initial graph. | 1075 // Print a replay of the initial graph. |
1076 GraphReplayPrinter::PrintReplay(data.graph()); | 1076 GraphReplayPrinter::PrintReplay(data.graph()); |
1077 } | 1077 } |
1078 | 1078 |
1079 // Bailout here in case target architecture is not supported. | |
1080 if (!SupportedTarget()) return Handle<Code>::null(); | |
1081 | |
1082 base::SmartPointer<Typer> typer; | 1079 base::SmartPointer<Typer> typer; |
1083 if (info()->is_typing_enabled()) { | 1080 if (info()->is_typing_enabled()) { |
1084 // Type the graph. | 1081 // Type the graph. |
1085 typer.Reset(new Typer(isolate(), data.graph(), info()->function_type())); | 1082 typer.Reset(new Typer(isolate(), data.graph(), info()->function_type())); |
1086 Run<TyperPhase>(typer.get()); | 1083 Run<TyperPhase>(typer.get()); |
1087 RunPrintAndVerify("Typed"); | 1084 RunPrintAndVerify("Typed"); |
1088 } | 1085 } |
1089 | 1086 |
1090 BeginPhaseKind("lowering"); | 1087 BeginPhaseKind("lowering"); |
1091 | 1088 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 pipeline.AllocateRegisters(config, run_verifier); | 1193 pipeline.AllocateRegisters(config, run_verifier); |
1197 return !data.compilation_failed(); | 1194 return !data.compilation_failed(); |
1198 } | 1195 } |
1199 | 1196 |
1200 | 1197 |
1201 Handle<Code> Pipeline::ScheduleAndGenerateCode( | 1198 Handle<Code> Pipeline::ScheduleAndGenerateCode( |
1202 CallDescriptor* call_descriptor) { | 1199 CallDescriptor* call_descriptor) { |
1203 PipelineData* data = this->data_; | 1200 PipelineData* data = this->data_; |
1204 | 1201 |
1205 DCHECK_NOT_NULL(data->graph()); | 1202 DCHECK_NOT_NULL(data->graph()); |
1206 CHECK(SupportedBackend()); | |
1207 | 1203 |
1208 if (data->schedule() == nullptr) Run<ComputeSchedulePhase>(); | 1204 if (data->schedule() == nullptr) Run<ComputeSchedulePhase>(); |
1209 TraceSchedule(data->info(), data->schedule()); | 1205 TraceSchedule(data->info(), data->schedule()); |
1210 | 1206 |
1211 BasicBlockProfiler::Data* profiler_data = NULL; | 1207 BasicBlockProfiler::Data* profiler_data = NULL; |
1212 if (FLAG_turbo_profiling) { | 1208 if (FLAG_turbo_profiling) { |
1213 profiler_data = BasicBlockInstrumentor::Instrument(info(), data->graph(), | 1209 profiler_data = BasicBlockInstrumentor::Instrument(info(), data->graph(), |
1214 data->schedule()); | 1210 data->schedule()); |
1215 } | 1211 } |
1216 | 1212 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1373 tcf << AsC1VRegisterAllocationData("CodeGen", | 1369 tcf << AsC1VRegisterAllocationData("CodeGen", |
1374 data->register_allocation_data()); | 1370 data->register_allocation_data()); |
1375 } | 1371 } |
1376 | 1372 |
1377 data->DeleteRegisterAllocationZone(); | 1373 data->DeleteRegisterAllocationZone(); |
1378 } | 1374 } |
1379 | 1375 |
1380 } // namespace compiler | 1376 } // namespace compiler |
1381 } // namespace internal | 1377 } // namespace internal |
1382 } // namespace v8 | 1378 } // namespace v8 |
OLD | NEW |