summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
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
commit1f047fd5134c8a158fa018ef0096b9c37ff1aaf8 (patch)
tree432652aab113584aff4e1b67944764b8e1bd029e /llvm/lib/Transforms/Utils
parent76dc204488fec901caed8985346fb912bcb62bbb (diff)
downloadbcm5719-llvm-1f047fd5134c8a158fa018ef0096b9c37ff1aaf8.tar.gz
bcm5719-llvm-1f047fd5134c8a158fa018ef0096b9c37ff1aaf8.zip
use splice instead of remove/insert to avoid some symtab operations
llvm-svn: 22611
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 34b31bc6991..3eaae8eacc5 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud