OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_GRAPH_VISUALIZER_H_ | 5 #ifndef V8_COMPILER_GRAPH_VISUALIZER_H_ |
6 #define V8_COMPILER_GRAPH_VISUALIZER_H_ | 6 #define V8_COMPILER_GRAPH_VISUALIZER_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
| 12 |
| 13 class CompilationInfo; |
| 14 |
12 namespace compiler { | 15 namespace compiler { |
13 | 16 |
14 class Graph; | 17 class Graph; |
| 18 class InstructionSequence; |
| 19 class RegisterAllocator; |
| 20 class Schedule; |
| 21 |
15 | 22 |
16 struct AsDOT { | 23 struct AsDOT { |
17 explicit AsDOT(const Graph& g) : graph(g) {} | 24 explicit AsDOT(const Graph& g) : graph(g) {} |
18 const Graph& graph; | 25 const Graph& graph; |
19 }; | 26 }; |
20 | 27 |
21 std::ostream& operator<<(std::ostream& os, const AsDOT& ad); | 28 std::ostream& operator<<(std::ostream& os, const AsDOT& ad); |
22 | 29 |
23 | 30 |
24 struct AsJSON { | 31 struct AsJSON { |
25 explicit AsJSON(const Graph& g) : graph(g) {} | 32 explicit AsJSON(const Graph& g) : graph(g) {} |
26 const Graph& graph; | 33 const Graph& graph; |
27 }; | 34 }; |
28 | 35 |
29 std::ostream& operator<<(std::ostream& os, const AsJSON& ad); | 36 std::ostream& operator<<(std::ostream& os, const AsJSON& ad); |
30 | 37 |
| 38 struct AsC1VCompilation { |
| 39 explicit AsC1VCompilation(const CompilationInfo* info) : info_(info) {} |
| 40 const CompilationInfo* info_; |
| 41 }; |
| 42 |
| 43 |
| 44 struct AsC1V { |
| 45 AsC1V(const char* phase, const Schedule* schedule, |
| 46 const InstructionSequence* instructions = NULL, |
| 47 const RegisterAllocator* allocator = NULL) |
| 48 : schedule_(schedule), |
| 49 instructions_(instructions), |
| 50 allocator_(allocator), |
| 51 phase_(phase) {} |
| 52 const Schedule* schedule_; |
| 53 const InstructionSequence* instructions_; |
| 54 const RegisterAllocator* allocator_; |
| 55 const char* phase_; |
| 56 }; |
| 57 |
| 58 struct AsC1VAllocator { |
| 59 explicit AsC1VAllocator(const char* phase, |
| 60 const RegisterAllocator* allocator = NULL) |
| 61 : phase_(phase), allocator_(allocator) {} |
| 62 const char* phase_; |
| 63 const RegisterAllocator* allocator_; |
| 64 }; |
| 65 |
| 66 std::ostream& operator<<(std::ostream& os, const AsDOT& ad); |
| 67 std::ostream& operator<<(std::ostream& os, const AsC1VCompilation& ac); |
| 68 std::ostream& operator<<(std::ostream& os, const AsC1V& ac); |
| 69 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac); |
| 70 |
31 } // namespace compiler | 71 } // namespace compiler |
32 } // namespace internal | 72 } // namespace internal |
33 } // namespace v8 | 73 } // namespace v8 |
34 | 74 |
35 #endif // V8_COMPILER_GRAPH_VISUALIZER_H_ | 75 #endif // V8_COMPILER_GRAPH_VISUALIZER_H_ |
OLD | NEW |