aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-08-03 00:23:42 +0000
committerChris Lattner <sabre@nondot.org>2005-08-03 00:23:42 +0000
commitd423b8b6ca3d2d21a8aa07a877d63e5dc45abc70 (patch)
tree32e9be0f9334b799e98ee9f8cbc5c590005a6fde /lib/Transforms/Utils/SimplifyCFG.cpp
parent2bdcb56146279009f233933a101cb3dd54a951cd (diff)
use splice instead of remove/insert to avoid some symtab operations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--lib/Transforms/Utils/SimplifyCFG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index 34b31bc699..3eaae8eacc 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -153,8 +153,8 @@ static bool TryToSimplifyUncondBranchFromEmptyBlock(BasicBlock *BB,
// *ONLY* had BB as a predecessor, and the PHI node is still valid
// now. Simply move it into Succ, because we know that BB
// strictly dominated Succ.
- BB->getInstList().remove(BB->begin());
- Succ->getInstList().push_front(PN);
+ Succ->getInstList().splice(Succ->begin(),
+ BB->getInstList(), BB->begin());
// We need to add new entries for the PHI node to account for
// predecessors of Succ that the PHI node does not take into