mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-14 15:25:25 +00:00
Use the transferSuccessors helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52495 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -381,11 +381,7 @@ MachineBasicBlock *BranchFolder::SplitMBBAt(MachineBasicBlock &CurMBB,
|
|||||||
CurMBB.getParent()->getBasicBlockList().insert(++MBBI, NewMBB);
|
CurMBB.getParent()->getBasicBlockList().insert(++MBBI, NewMBB);
|
||||||
|
|
||||||
// Move all the successors of this block to the specified block.
|
// Move all the successors of this block to the specified block.
|
||||||
while (!CurMBB.succ_empty()) {
|
NewMBB->transferSuccessors(&CurMBB);
|
||||||
MachineBasicBlock *S = *(CurMBB.succ_end()-1);
|
|
||||||
NewMBB->addSuccessor(S);
|
|
||||||
CurMBB.removeSuccessor(S);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add an edge from CurMBB to NewMBB for the fall-through.
|
// Add an edge from CurMBB to NewMBB for the fall-through.
|
||||||
CurMBB.addSuccessor(NewMBB);
|
CurMBB.addSuccessor(NewMBB);
|
||||||
|
Reference in New Issue
Block a user