| 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/platform/elapsed-timer.h" | 10 #include "src/base/platform/elapsed-timer.h" |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 CallDescriptor* call_descriptor = | 996 CallDescriptor* call_descriptor = |
| 997 Linkage::ComputeIncoming(info->zone(), info); | 997 Linkage::ComputeIncoming(info->zone(), info); |
| 998 return GenerateCodeForTesting(info, call_descriptor, graph, schedule); | 998 return GenerateCodeForTesting(info, call_descriptor, graph, schedule); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 | 1001 |
| 1002 Handle<Code> Pipeline::GenerateCodeForTesting(Isolate* isolate, | 1002 Handle<Code> Pipeline::GenerateCodeForTesting(Isolate* isolate, |
| 1003 CallDescriptor* call_descriptor, | 1003 CallDescriptor* call_descriptor, |
| 1004 Graph* graph, | 1004 Graph* graph, |
| 1005 Schedule* schedule) { | 1005 Schedule* schedule) { |
| 1006 CompilationInfo info(isolate, graph->zone()); | 1006 FakeStubForTesting stub(isolate); |
| 1007 CompilationInfo info(&stub, isolate, graph->zone()); |
| 1007 return GenerateCodeForTesting(&info, call_descriptor, graph, schedule); | 1008 return GenerateCodeForTesting(&info, call_descriptor, graph, schedule); |
| 1008 } | 1009 } |
| 1009 | 1010 |
| 1010 | 1011 |
| 1011 Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, | 1012 Handle<Code> Pipeline::GenerateCodeForTesting(CompilationInfo* info, |
| 1012 CallDescriptor* call_descriptor, | 1013 CallDescriptor* call_descriptor, |
| 1013 Graph* graph, | 1014 Graph* graph, |
| 1014 Schedule* schedule) { | 1015 Schedule* schedule) { |
| 1015 CHECK(SupportedBackend()); | 1016 CHECK(SupportedBackend()); |
| 1016 ZonePool zone_pool; | 1017 ZonePool zone_pool; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1037 code->Disassemble("test code", os); | 1038 code->Disassemble("test code", os); |
| 1038 } | 1039 } |
| 1039 #endif | 1040 #endif |
| 1040 return code; | 1041 return code; |
| 1041 } | 1042 } |
| 1042 | 1043 |
| 1043 | 1044 |
| 1044 bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config, | 1045 bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config, |
| 1045 InstructionSequence* sequence, | 1046 InstructionSequence* sequence, |
| 1046 bool run_verifier) { | 1047 bool run_verifier) { |
| 1047 CompilationInfo info(sequence->isolate(), sequence->zone()); | 1048 FakeStubForTesting stub(sequence->isolate()); |
| 1049 CompilationInfo info(&stub, sequence->isolate(), sequence->zone()); |
| 1048 ZonePool zone_pool; | 1050 ZonePool zone_pool; |
| 1049 PipelineData data(&zone_pool, &info); | 1051 PipelineData data(&zone_pool, &info); |
| 1050 data.InitializeTorTesting(sequence); | 1052 data.InitializeTorTesting(sequence); |
| 1051 Pipeline pipeline(&info); | 1053 Pipeline pipeline(&info); |
| 1052 pipeline.data_ = &data; | 1054 pipeline.data_ = &data; |
| 1053 pipeline.AllocateRegisters(config, run_verifier); | 1055 pipeline.AllocateRegisters(config, run_verifier); |
| 1054 return !data.compilation_failed(); | 1056 return !data.compilation_failed(); |
| 1055 } | 1057 } |
| 1056 | 1058 |
| 1057 | 1059 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 | 1178 |
| 1177 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { | 1179 if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) { |
| 1178 TurboCfgFile tcf(data->isolate()); | 1180 TurboCfgFile tcf(data->isolate()); |
| 1179 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); | 1181 tcf << AsC1VAllocator("CodeGen", data->register_allocator()); |
| 1180 } | 1182 } |
| 1181 } | 1183 } |
| 1182 | 1184 |
| 1183 } // namespace compiler | 1185 } // namespace compiler |
| 1184 } // namespace internal | 1186 } // namespace internal |
| 1185 } // namespace v8 | 1187 } // namespace v8 |
| OLD | NEW |