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_SCHEDULE_H_ | 5 #ifndef V8_COMPILER_SCHEDULE_H_ |
6 #define V8_COMPILER_SCHEDULE_H_ | 6 #define V8_COMPILER_SCHEDULE_H_ |
7 | 7 |
| 8 #include <iosfwd> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "src/v8.h" | 11 #include "src/v8.h" |
11 | 12 |
12 #include "src/compiler/node.h" | 13 #include "src/compiler/node.h" |
13 #include "src/compiler/opcodes.h" | 14 #include "src/compiler/opcodes.h" |
14 #include "src/zone.h" | 15 #include "src/zone.h" |
15 | 16 |
16 namespace v8 { | 17 namespace v8 { |
17 namespace internal { | 18 namespace internal { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 Node* control_input_; // Input value for control. | 158 Node* control_input_; // Input value for control. |
158 NodeVector nodes_; // nodes of this block in forward order. | 159 NodeVector nodes_; // nodes of this block in forward order. |
159 | 160 |
160 Successors successors_; | 161 Successors successors_; |
161 Predecessors predecessors_; | 162 Predecessors predecessors_; |
162 Id id_; | 163 Id id_; |
163 | 164 |
164 DISALLOW_COPY_AND_ASSIGN(BasicBlock); | 165 DISALLOW_COPY_AND_ASSIGN(BasicBlock); |
165 }; | 166 }; |
166 | 167 |
167 OStream& operator<<(OStream& os, const BasicBlock::Control& c); | 168 std::ostream& operator<<(std::ostream& os, const BasicBlock::Control& c); |
168 OStream& operator<<(OStream& os, const BasicBlock::Id& id); | 169 std::ostream& operator<<(std::ostream& os, const BasicBlock::Id& id); |
169 | 170 |
170 typedef ZoneVector<BasicBlock*> BasicBlockVector; | 171 typedef ZoneVector<BasicBlock*> BasicBlockVector; |
171 typedef BasicBlockVector::iterator BasicBlockVectorIter; | 172 typedef BasicBlockVector::iterator BasicBlockVectorIter; |
172 typedef BasicBlockVector::reverse_iterator BasicBlockVectorRIter; | 173 typedef BasicBlockVector::reverse_iterator BasicBlockVectorRIter; |
173 | 174 |
174 // A schedule represents the result of assigning nodes to basic blocks | 175 // A schedule represents the result of assigning nodes to basic blocks |
175 // and ordering them within basic blocks. Prior to computing a schedule, | 176 // and ordering them within basic blocks. Prior to computing a schedule, |
176 // a graph has no notion of control flow ordering other than that induced | 177 // a graph has no notion of control flow ordering other than that induced |
177 // by the graph's dependencies. A schedule is required to generate code. | 178 // by the graph's dependencies. A schedule is required to generate code. |
178 class Schedule FINAL : public ZoneObject { | 179 class Schedule FINAL : public ZoneObject { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 void SetBlockForNode(BasicBlock* block, Node* node); | 234 void SetBlockForNode(BasicBlock* block, Node* node); |
234 | 235 |
235 Zone* zone_; | 236 Zone* zone_; |
236 BasicBlockVector all_blocks_; // All basic blocks in the schedule. | 237 BasicBlockVector all_blocks_; // All basic blocks in the schedule. |
237 BasicBlockVector nodeid_to_block_; // Map from node to containing block. | 238 BasicBlockVector nodeid_to_block_; // Map from node to containing block. |
238 BasicBlockVector rpo_order_; // Reverse-post-order block list. | 239 BasicBlockVector rpo_order_; // Reverse-post-order block list. |
239 BasicBlock* start_; | 240 BasicBlock* start_; |
240 BasicBlock* end_; | 241 BasicBlock* end_; |
241 }; | 242 }; |
242 | 243 |
243 OStream& operator<<(OStream& os, const Schedule& s); | 244 std::ostream& operator<<(std::ostream& os, const Schedule& s); |
244 } | 245 |
245 } | 246 } // namespace compiler |
246 } // namespace v8::internal::compiler | 247 } // namespace internal |
| 248 } // namespace v8 |
247 | 249 |
248 #endif // V8_COMPILER_SCHEDULE_H_ | 250 #endif // V8_COMPILER_SCHEDULE_H_ |
OLD | NEW |