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 #ifndef V8_COMPILER_PIPELINE_H_ | 5 #ifndef V8_COMPILER_PIPELINE_H_ |
6 #define V8_COMPILER_PIPELINE_H_ | 6 #define V8_COMPILER_PIPELINE_H_ |
7 | 7 |
8 // Clients of this interface shouldn't depend on lots of compiler internals. | 8 // Clients of this interface shouldn't depend on lots of compiler internals. |
9 // Do not include anything from src/compiler here! | 9 // Do not include anything from src/compiler here! |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 // Run the pipeline on a machine graph and generate code. If {schedule} is | 56 // Run the pipeline on a machine graph and generate code. If {schedule} is |
57 // {nullptr}, then compute a new schedule for code generation. | 57 // {nullptr}, then compute a new schedule for code generation. |
58 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, | 58 static Handle<Code> GenerateCodeForTesting(CompilationInfo* info, |
59 CallDescriptor* call_descriptor, | 59 CallDescriptor* call_descriptor, |
60 Graph* graph, | 60 Graph* graph, |
61 Schedule* schedule = nullptr); | 61 Schedule* schedule = nullptr); |
62 | 62 |
63 // Returns a new compilation job for the given compilation info. | 63 // Returns a new compilation job for the given compilation info. |
64 static OptimizedCompileJob* NewCompilationJob(CompilationInfo* info); | 64 static OptimizedCompileJob* NewCompilationJob(CompilationInfo* info); |
65 | 65 |
66 void InitializeWasmCompilation(Zone* pipeline_zone, ZonePool* zone_pool, | 66 void InitializeWasmCompilation(Zone* pipeline_zone, ZonePool* zone_pool, |
Michael Starzinger
2016/04/20 16:59:08
Not actionable for this CL, but I think we should
| |
67 Graph* graph); | 67 Graph* graph); |
68 void FinalizeWasmCompilation(); | 68 bool ExecuteWasmCompilation(CallDescriptor* descriptor); |
69 Handle<Code> FinalizeWasmCompilation(CallDescriptor* descriptor); | |
69 | 70 |
70 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); | 71 Handle<Code> ScheduleAndGenerateCode(CallDescriptor* call_descriptor); |
Michael Starzinger
2016/04/20 20:46:32
Also, this seems to no longer be called from the o
ahaas
2016/04/21 07:59:43
Done.
| |
71 | 72 |
72 private: | 73 private: |
73 // Helpers for executing pipeline phases. | 74 // Helpers for executing pipeline phases. |
74 template <typename Phase> | 75 template <typename Phase> |
75 void Run(); | 76 void Run(); |
76 template <typename Phase, typename Arg0> | 77 template <typename Phase, typename Arg0> |
77 void Run(Arg0 arg_0); | 78 void Run(Arg0 arg_0); |
78 template <typename Phase, typename Arg0, typename Arg1> | 79 template <typename Phase, typename Arg0, typename Arg1> |
79 void Run(Arg0 arg_0, Arg1 arg_1); | 80 void Run(Arg0 arg_0, Arg1 arg_1); |
80 | 81 |
81 void BeginPhaseKind(const char* phase_kind); | 82 void BeginPhaseKind(const char* phase_kind); |
82 void RunPrintAndVerify(const char* phase, bool untyped = false); | 83 void RunPrintAndVerify(const char* phase, bool untyped = false); |
83 void AllocateRegisters(const RegisterConfiguration* config, | 84 void AllocateRegisters(const RegisterConfiguration* config, |
84 CallDescriptor* descriptor, bool run_verifier); | 85 CallDescriptor* descriptor, bool run_verifier); |
85 | 86 |
86 CompilationInfo* info() const { return info_; } | 87 CompilationInfo* info() const { return info_; } |
87 Isolate* isolate() const; | 88 Isolate* isolate() const; |
88 | 89 |
89 CompilationInfo* const info_; | 90 CompilationInfo* const info_; |
90 PipelineData* data_; | 91 PipelineData* data_; |
91 | 92 |
92 DISALLOW_COPY_AND_ASSIGN(Pipeline); | 93 DISALLOW_COPY_AND_ASSIGN(Pipeline); |
93 }; | 94 }; |
94 | 95 |
95 } // namespace compiler | 96 } // namespace compiler |
96 } // namespace internal | 97 } // namespace internal |
97 } // namespace v8 | 98 } // namespace v8 |
98 | 99 |
99 #endif // V8_COMPILER_PIPELINE_H_ | 100 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |