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 | 9 |
10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 BasicBlock* start() { return start_; } | 250 BasicBlock* start() { return start_; } |
251 BasicBlock* end() { return end_; } | 251 BasicBlock* end() { return end_; } |
252 | 252 |
253 Zone* zone() const { return zone_; } | 253 Zone* zone() const { return zone_; } |
254 | 254 |
255 private: | 255 private: |
256 friend class Scheduler; | 256 friend class Scheduler; |
257 friend class BasicBlockInstrumentor; | 257 friend class BasicBlockInstrumentor; |
258 friend class RawMachineAssembler; | 258 friend class RawMachineAssembler; |
259 | 259 |
| 260 // Ensure properties of the CFG assumed by further stages. |
| 261 void EnsureCFGWellFormedness(); |
260 // Ensure split-edge form for a hand-assembled schedule. | 262 // Ensure split-edge form for a hand-assembled schedule. |
261 void EnsureSplitEdgeForm(); | 263 void EnsureSplitEdgeForm(BasicBlock* block); |
| 264 // Ensure entry into a deferred block happens from a single hot block. |
| 265 void EnsureDeferredCodeSingleEntryPoint(BasicBlock* block); |
262 // Copy deferred block markers down as far as possible | 266 // Copy deferred block markers down as far as possible |
263 void PropagateDeferredMark(); | 267 void PropagateDeferredMark(); |
264 | 268 |
265 void AddSuccessor(BasicBlock* block, BasicBlock* succ); | 269 void AddSuccessor(BasicBlock* block, BasicBlock* succ); |
266 void MoveSuccessors(BasicBlock* from, BasicBlock* to); | 270 void MoveSuccessors(BasicBlock* from, BasicBlock* to); |
267 | 271 |
268 void SetControlInput(BasicBlock* block, Node* node); | 272 void SetControlInput(BasicBlock* block, Node* node); |
269 void SetBlockForNode(BasicBlock* block, Node* node); | 273 void SetBlockForNode(BasicBlock* block, Node* node); |
270 | 274 |
271 Zone* zone_; | 275 Zone* zone_; |
272 BasicBlockVector all_blocks_; // All basic blocks in the schedule. | 276 BasicBlockVector all_blocks_; // All basic blocks in the schedule. |
273 BasicBlockVector nodeid_to_block_; // Map from node to containing block. | 277 BasicBlockVector nodeid_to_block_; // Map from node to containing block. |
274 BasicBlockVector rpo_order_; // Reverse-post-order block list. | 278 BasicBlockVector rpo_order_; // Reverse-post-order block list. |
275 BasicBlock* start_; | 279 BasicBlock* start_; |
276 BasicBlock* end_; | 280 BasicBlock* end_; |
277 | 281 |
278 DISALLOW_COPY_AND_ASSIGN(Schedule); | 282 DISALLOW_COPY_AND_ASSIGN(Schedule); |
279 }; | 283 }; |
280 | 284 |
281 std::ostream& operator<<(std::ostream&, const Schedule&); | 285 std::ostream& operator<<(std::ostream&, const Schedule&); |
282 | 286 |
283 } // namespace compiler | 287 } // namespace compiler |
284 } // namespace internal | 288 } // namespace internal |
285 } // namespace v8 | 289 } // namespace v8 |
286 | 290 |
287 #endif // V8_COMPILER_SCHEDULE_H_ | 291 #endif // V8_COMPILER_SCHEDULE_H_ |
OLD | NEW |