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 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1132 } | 1132 } |
1133 | 1133 |
1134 | 1134 |
1135 Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, | 1135 Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
1136 CallDescriptor* call_descriptor, | 1136 CallDescriptor* call_descriptor, |
1137 Graph* graph, | 1137 Graph* graph, |
1138 Schedule* schedule) { | 1138 Schedule* schedule) { |
1139 // Construct a pipeline for scheduling and code generation. | 1139 // Construct a pipeline for scheduling and code generation. |
1140 ZonePool zone_pool; | 1140 ZonePool zone_pool; |
1141 PipelineData data(&zone_pool, info, graph, schedule); | 1141 PipelineData data(&zone_pool, info, graph, schedule); |
1142 SmartPointer<PipelineStatistics> pipeline_statistics; | |
1143 if (FLAG_turbo_stats) { | |
1144 pipeline_statistics.Reset(new PipelineStatistics(info, &zone_pool)); | |
1145 pipeline_statistics->BeginPhaseKind("test codegen"); | |
1146 } | |
1147 | |
1148 Pipeline pipeline(info); | 1142 Pipeline pipeline(info); |
1149 pipeline.data_ = &data; | 1143 pipeline.data_ = &data; |
1150 if (data.schedule() == nullptr) { | 1144 if (data.schedule() == nullptr) { |
1151 // TODO(rossberg): Should this really be untyped? | 1145 // TODO(rossberg): Should this really be untyped? |
1152 pipeline.RunPrintAndVerify("Machine", true); | 1146 pipeline.RunPrintAndVerify("Machine", true); |
1153 } | 1147 } |
1154 | 1148 |
1155 return pipeline.ScheduleAndGenerateCode(call_descriptor); | 1149 return pipeline.ScheduleAndGenerateCode(call_descriptor); |
1156 } | 1150 } |
1157 | 1151 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1344 tcf << AsC1VRegisterAllocationData("CodeGen", | 1338 tcf << AsC1VRegisterAllocationData("CodeGen", |
1345 data->register_allocation_data()); | 1339 data->register_allocation_data()); |
1346 } | 1340 } |
1347 | 1341 |
1348 data->DeleteRegisterAllocationZone(); | 1342 data->DeleteRegisterAllocationZone(); |
1349 } | 1343 } |
1350 | 1344 |
1351 } // namespace compiler | 1345 } // namespace compiler |
1352 } // namespace internal | 1346 } // namespace internal |
1353 } // namespace v8 | 1347 } // namespace v8 |
OLD | NEW |