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 #include <fstream> // NOLINT(readability/streams) | 8 #include <fstream> // NOLINT(readability/streams) |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
11 | 11 |
12 #include "src/compiler.h" | 12 #include "src/compiler.h" |
13 | 13 |
14 // Note: TODO(turbofan) implies a performance improvement opportunity, | 14 // Note: TODO(turbofan) implies a performance improvement opportunity, |
15 // and TODO(name) implies an incomplete implementation | 15 // and TODO(name) implies an incomplete implementation |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 namespace compiler { | 19 namespace compiler { |
20 | 20 |
21 // Clients of this interface shouldn't depend on lots of compiler internals. | 21 // Clients of this interface shouldn't depend on lots of compiler internals. |
22 class Graph; | 22 class Graph; |
23 class InstructionSequence; | 23 class InstructionSequence; |
24 class Linkage; | 24 class Linkage; |
| 25 class PipelineStatistics; |
25 class RegisterAllocator; | 26 class RegisterAllocator; |
26 class Schedule; | 27 class Schedule; |
27 class SourcePositionTable; | 28 class SourcePositionTable; |
28 class ZonePool; | 29 class ZonePool; |
29 | 30 |
30 class Pipeline { | 31 class Pipeline { |
31 public: | 32 public: |
32 explicit Pipeline(CompilationInfo* info) : info_(info) {} | 33 explicit Pipeline(CompilationInfo* info) : info_(info) {} |
33 | 34 |
34 // Run the entire pipeline and generate a handle to a code object. | 35 // Run the entire pipeline and generate a handle to a code object. |
(...skipping 19 matching lines...) Expand all Loading... |
54 | 55 |
55 Schedule* ComputeSchedule(ZonePool* zone_pool, Graph* graph); | 56 Schedule* ComputeSchedule(ZonePool* zone_pool, Graph* graph); |
56 void OpenTurboCfgFile(std::ofstream* stream); | 57 void OpenTurboCfgFile(std::ofstream* stream); |
57 void PrintCompilationStart(); | 58 void PrintCompilationStart(); |
58 void PrintScheduleAndInstructions(const char* phase, const Schedule* schedule, | 59 void PrintScheduleAndInstructions(const char* phase, const Schedule* schedule, |
59 const SourcePositionTable* positions, | 60 const SourcePositionTable* positions, |
60 const InstructionSequence* instructions); | 61 const InstructionSequence* instructions); |
61 void PrintAllocator(const char* phase, const RegisterAllocator* allocator); | 62 void PrintAllocator(const char* phase, const RegisterAllocator* allocator); |
62 void VerifyAndPrintGraph(Graph* graph, const char* phase, | 63 void VerifyAndPrintGraph(Graph* graph, const char* phase, |
63 bool untyped = false); | 64 bool untyped = false); |
64 Handle<Code> GenerateCode(ZonePool* zone_pool, Linkage* linkage, Graph* graph, | 65 Handle<Code> GenerateCode(PipelineStatistics* pipeline_statistics, |
| 66 ZonePool* zone_pool, Linkage* linkage, Graph* graph, |
65 Schedule* schedule, | 67 Schedule* schedule, |
66 SourcePositionTable* source_positions); | 68 SourcePositionTable* source_positions); |
67 }; | 69 }; |
68 } | 70 } |
69 } | 71 } |
70 } // namespace v8::internal::compiler | 72 } // namespace v8::internal::compiler |
71 | 73 |
72 #endif // V8_COMPILER_PIPELINE_H_ | 74 #endif // V8_COMPILER_PIPELINE_H_ |
OLD | NEW |