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 <iosfwd> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 BasicBlockVector* rpo_order() { return &rpo_order_; } | 258 BasicBlockVector* rpo_order() { return &rpo_order_; } |
259 const BasicBlockVector* rpo_order() const { return &rpo_order_; } | 259 const BasicBlockVector* rpo_order() const { return &rpo_order_; } |
260 | 260 |
261 BasicBlock* start() { return start_; } | 261 BasicBlock* start() { return start_; } |
262 BasicBlock* end() { return end_; } | 262 BasicBlock* end() { return end_; } |
263 | 263 |
264 Zone* zone() const { return zone_; } | 264 Zone* zone() const { return zone_; } |
265 | 265 |
266 private: | 266 private: |
267 friend class Scheduler; | 267 friend class Scheduler; |
268 friend class CodeGenerator; | |
269 friend class ScheduleVisualizer; | |
270 friend class BasicBlockInstrumentor; | 268 friend class BasicBlockInstrumentor; |
271 | 269 |
272 void AddSuccessor(BasicBlock* block, BasicBlock* succ); | 270 void AddSuccessor(BasicBlock* block, BasicBlock* succ); |
273 void MoveSuccessors(BasicBlock* from, BasicBlock* to); | 271 void MoveSuccessors(BasicBlock* from, BasicBlock* to); |
274 | 272 |
275 void SetControlInput(BasicBlock* block, Node* node); | 273 void SetControlInput(BasicBlock* block, Node* node); |
276 void SetBlockForNode(BasicBlock* block, Node* node); | 274 void SetBlockForNode(BasicBlock* block, Node* node); |
277 | 275 |
278 Zone* zone_; | 276 Zone* zone_; |
279 BasicBlockVector all_blocks_; // All basic blocks in the schedule. | 277 BasicBlockVector all_blocks_; // All basic blocks in the schedule. |
280 BasicBlockVector nodeid_to_block_; // Map from node to containing block. | 278 BasicBlockVector nodeid_to_block_; // Map from node to containing block. |
281 BasicBlockVector rpo_order_; // Reverse-post-order block list. | 279 BasicBlockVector rpo_order_; // Reverse-post-order block list. |
282 BasicBlock* start_; | 280 BasicBlock* start_; |
283 BasicBlock* end_; | 281 BasicBlock* end_; |
284 | 282 |
285 DISALLOW_COPY_AND_ASSIGN(Schedule); | 283 DISALLOW_COPY_AND_ASSIGN(Schedule); |
286 }; | 284 }; |
287 | 285 |
288 std::ostream& operator<<(std::ostream& os, const Schedule& s); | 286 std::ostream& operator<<(std::ostream& os, const Schedule& s); |
289 | 287 |
290 } // namespace compiler | 288 } // namespace compiler |
291 } // namespace internal | 289 } // namespace internal |
292 } // namespace v8 | 290 } // namespace v8 |
293 | 291 |
294 #endif // V8_COMPILER_SCHEDULE_H_ | 292 #endif // V8_COMPILER_SCHEDULE_H_ |
OLD | NEW |