summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-06-21 02:09:03 +0000
committerChad Rosier <mcrosier@apple.com>2011-06-21 02:09:03 +0000
commit184f3b37e2a6812c647c2614613a9eebfe33247b (patch)
treec716044e0e18ef2e5a91d6daa7286896d80d38b5 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parentfe356d356ad411306d360da58c9b5fef1175fc95 (diff)
downloadbcm5719-llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.tar.gz
bcm5719-llvm-184f3b37e2a6812c647c2614613a9eebfe33247b.zip
Revert r133435 and r133449 to appease buildbots.
llvm-svn: 133499
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/BasicBlockUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
index b4f74f97e97..92464e8cf13 100644
--- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -153,13 +153,13 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, Pass *P) {
// Delete the unconditional branch from the predecessor...
PredBB->getInstList().pop_back();
+ // Move all definitions in the successor to the predecessor...
+ PredBB->getInstList().splice(PredBB->end(), BB->getInstList());
+
// Make all PHI nodes that referred to BB now refer to Pred as their
// source...
BB->replaceAllUsesWith(PredBB);
- // Move all definitions in the successor to the predecessor...
- PredBB->getInstList().splice(PredBB->end(), BB->getInstList());
-
// Inherit predecessors name if it exists.
if (!PredBB->hasName())
PredBB->takeName(BB);
OpenPOWER on IntegriCloud