Index: src/compiler/schedule.h |
diff --git a/src/compiler/schedule.h b/src/compiler/schedule.h |
index 5ff554f821e6545f5666e0b3b5b0325f030885b9..e6076ce58d7aaeb08892a85680af2ad6e02ac9b0 100644 |
--- a/src/compiler/schedule.h |
+++ b/src/compiler/schedule.h |
@@ -95,6 +95,7 @@ class BasicBlock FINAL : public ZoneObject { |
} |
size_t PredecessorCount() const { return predecessors_.size(); } |
BasicBlock* PredecessorAt(size_t index) { return predecessors_[index]; } |
+ void ClearPredecessors() { predecessors_.clear(); } |
void AddPredecessor(BasicBlock* predecessor); |
typedef ZoneVector<BasicBlock*> Successors; |
@@ -108,6 +109,7 @@ class BasicBlock FINAL : public ZoneObject { |
} |
size_t SuccessorCount() const { return successors_.size(); } |
BasicBlock* SuccessorAt(size_t index) { return successors_[index]; } |
+ void ClearSuccessors() { successors_.clear(); } |
void AddSuccessor(BasicBlock* successor); |
// Nodes in the basic block. |
@@ -240,7 +242,14 @@ class Schedule FINAL : public ZoneObject { |
// BasicBlock building: add a throw at the end of {block}. |
void AddThrow(BasicBlock* block, Node* input); |
- void AddSuccessor(BasicBlock* block, BasicBlock* succ); |
+ // BasicBlock mutation: insert a branch into the end of {block}. |
+ void InsertBranch(BasicBlock* block, BasicBlock* end, Node* branch, |
+ BasicBlock* tblock, BasicBlock* fblock); |
+ |
+ // Exposed publicly for testing only. |
+ void AddSuccessorForTesting(BasicBlock* block, BasicBlock* succ) { |
+ return AddSuccessor(block, succ); |
+ } |
BasicBlockVector* rpo_order() { return &rpo_order_; } |
const BasicBlockVector* rpo_order() const { return &rpo_order_; } |
@@ -256,6 +265,9 @@ class Schedule FINAL : public ZoneObject { |
friend class ScheduleVisualizer; |
friend class BasicBlockInstrumentor; |
+ void AddSuccessor(BasicBlock* block, BasicBlock* succ); |
+ void MoveSuccessors(BasicBlock* from, BasicBlock* to); |
+ |
void SetControlInput(BasicBlock* block, Node* node); |
void SetBlockForNode(BasicBlock* block, Node* node); |