OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef V8_COMPILER_GRAPH_VISUALIZER_H_ | |
6 #define V8_COMPILER_GRAPH_VISUALIZER_H_ | |
7 | |
8 #include <iosfwd> | |
9 | |
10 namespace v8 { | |
11 namespace internal { | |
12 | |
13 class CompilationInfo; | |
14 | |
15 namespace compiler { | |
16 | |
17 class Graph; | |
18 class InstructionSequence; | |
19 class RegisterAllocator; | |
20 class Schedule; | |
21 class SourcePositionTable; | |
22 | |
23 FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase, | |
24 const char* suffix, const char* mode); | |
25 | |
26 struct AsDOT { | |
27 explicit AsDOT(const Graph& g) : graph(g) {} | |
28 const Graph& graph; | |
29 }; | |
30 | |
31 std::ostream& operator<<(std::ostream& os, const AsDOT& ad); | |
32 | |
33 | |
34 struct AsJSON { | |
35 AsJSON(const Graph& g, SourcePositionTable* p) : graph(g), positions(p) {} | |
36 const Graph& graph; | |
37 const SourcePositionTable* positions; | |
38 }; | |
39 | |
40 std::ostream& operator<<(std::ostream& os, const AsJSON& ad); | |
41 | |
42 struct AsRPO { | |
43 explicit AsRPO(const Graph& g) : graph(g) {} | |
44 const Graph& graph; | |
45 }; | |
46 | |
47 std::ostream& operator<<(std::ostream& os, const AsRPO& ad); | |
48 | |
49 | |
50 struct AsC1VCompilation { | |
51 explicit AsC1VCompilation(const CompilationInfo* info) : info_(info) {} | |
52 const CompilationInfo* info_; | |
53 }; | |
54 | |
55 | |
56 struct AsC1V { | |
57 AsC1V(const char* phase, const Schedule* schedule, | |
58 const SourcePositionTable* positions = NULL, | |
59 const InstructionSequence* instructions = NULL) | |
60 : schedule_(schedule), | |
61 instructions_(instructions), | |
62 positions_(positions), | |
63 phase_(phase) {} | |
64 const Schedule* schedule_; | |
65 const InstructionSequence* instructions_; | |
66 const SourcePositionTable* positions_; | |
67 const char* phase_; | |
68 }; | |
69 | |
70 struct AsC1VAllocator { | |
71 explicit AsC1VAllocator(const char* phase, | |
72 const RegisterAllocator* allocator = NULL) | |
73 : phase_(phase), allocator_(allocator) {} | |
74 const char* phase_; | |
75 const RegisterAllocator* allocator_; | |
76 }; | |
77 | |
78 std::ostream& operator<<(std::ostream& os, const AsDOT& ad); | |
79 std::ostream& operator<<(std::ostream& os, const AsC1VCompilation& ac); | |
80 std::ostream& operator<<(std::ostream& os, const AsC1V& ac); | |
81 std::ostream& operator<<(std::ostream& os, const AsC1VAllocator& ac); | |
82 | |
83 } // namespace compiler | |
84 } // namespace internal | |
85 } // namespace v8 | |
86 | |
87 #endif // V8_COMPILER_GRAPH_VISUALIZER_H_ | |
OLD | NEW |