summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-21 10:33:19 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-21 10:33:19 +0000
commita97a2c998e1b6c59e58d53c8ee29082901248786 (patch)
treec6d5b9c218256cc4c2e3116c63c6e79d8ab86797 /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parent25127ab1e4d1a68f26943c3a87c9cf26fca82e8f (diff)
downloadbcm5719-llvm-a97a2c998e1b6c59e58d53c8ee29082901248786.tar.gz
bcm5719-llvm-a97a2c998e1b6c59e58d53c8ee29082901248786.zip
Reinstate r133435 and r133449 (reverted in r133499) now that the clang
self-hosted build failure has been fixed (r133512). llvm-svn: 133513
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 92464e8cf13..b4f74f97e97 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