[llvm-commits] [llvm] r145883 - /llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Dec 5 16:51:12 PST 2011
Author: stoklund
Date: Mon Dec 5 18:51:12 2011
New Revision: 145883
URL: http://llvm.org/viewvc/llvm-project?rev=145883&view=rev
Log:
Use an existing function.
Modified:
llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
Modified: llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp?rev=145883&r1=145882&r2=145883&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMConstantIslandPass.cpp Mon Dec 5 18:51:12 2011
@@ -747,16 +747,7 @@
++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);
More information about the llvm-commits
mailing list