diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-06 00:51:12 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-12-06 00:51:12 +0000 |
commit | e80fba0e6c976039c132c3d5d4fcad569d2259a8 (patch) | |
tree | 9054b055572b3acdb6dd116a9924b10ac13319fb /lib/Target/ARM/ARMConstantIslandPass.cpp | |
parent | 757a3179b2f3424bf64e0ac92934915c1d9c6fd0 (diff) | |
download | llvm-e80fba0e6c976039c132c3d5d4fcad569d2259a8.tar.gz llvm-e80fba0e6c976039c132c3d5d4fcad569d2259a8.tar.bz2 llvm-e80fba0e6c976039c132c3d5d4fcad569d2259a8.tar.xz |
Use an existing function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantIslandPass.cpp')
-rw-r--r-- | lib/Target/ARM/ARMConstantIslandPass.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp index 3e3a4134c7..fedbbad56f 100644 --- a/lib/Target/ARM/ARMConstantIslandPass.cpp +++ b/lib/Target/ARM/ARMConstantIslandPass.cpp @@ -747,16 +747,7 @@ MachineBasicBlock *ARMConstantIslands::SplitBlockBeforeInstr(MachineInstr *MI) { ++NumSplit; // Update the CFG. All succs of OrigBB are now succs of NewBB. - while (!OrigBB->succ_empty()) { - MachineBasicBlock *Succ = *OrigBB->succ_begin(); - OrigBB->removeSuccessor(Succ); - NewBB->addSuccessor(Succ); - - // This pass should be run after register allocation, so there should be no - // PHI nodes to update. - assert((Succ->empty() || !Succ->begin()->isPHI()) - && "PHI nodes should be eliminated by now!"); - } + NewBB->transferSuccessors(OrigBB); // OrigBB branches to NewBB. OrigBB->addSuccessor(NewBB); |