summaryrefslogtreecommitdiff
path: root/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
commita88a0ca8082006b37d14d8aee4a644b20bae8bc9 (patch)
tree50672ebd357c0af7075c51ab546813243c10b978 /lib/Transforms/Utils/BasicBlockUtils.cpp
parent805569f54aa5ac3ac4c59a008ba68913177b3ce8 (diff)
downloadllvm-a88a0ca8082006b37d14d8aee4a644b20bae8bc9.tar.gz
llvm-a88a0ca8082006b37d14d8aee4a644b20bae8bc9.tar.bz2
llvm-a88a0ca8082006b37d14d8aee4a644b20bae8bc9.tar.xz
Revert r133435 and r133449 to appease buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/BasicBlockUtils.cpp')
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp
index b4f74f97e9..92464e8cf1 100644
--- a/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/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);