aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-03-09 05:04:48 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-03-09 05:04:48 +0000
commit998a529aa2d7fbd140782b4a3b7787c4d18ddd38 (patch)
tree43eba4c5e757ca7e8b5a237ad5c60cea059d6b4f /lib/Transforms
parent62bf14d17c085faf184f207912106fe93da746d7 (diff)
downloadexternal_llvm-998a529aa2d7fbd140782b4a3b7787c4d18ddd38.zip
external_llvm-998a529aa2d7fbd140782b4a3b7787c4d18ddd38.tar.gz
external_llvm-998a529aa2d7fbd140782b4a3b7787c4d18ddd38.tar.bz2
Two things. Preserve the unwind_to when splitting a BB.
Add the ability to remove just one instance of a BB from a phi node. This fixes the compile error in the tree now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48085 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/BasicBlockUtils.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/BasicBlockUtils.cpp b/lib/Transforms/Utils/BasicBlockUtils.cpp
index 3607237..0dc38a2 100644
--- a/lib/Transforms/Utils/BasicBlockUtils.cpp
+++ b/lib/Transforms/Utils/BasicBlockUtils.cpp
@@ -160,6 +160,7 @@ BasicBlock *llvm::SplitBlock(BasicBlock *Old, Instruction *SplitPt, Pass *P) {
while (isa<PHINode>(SplitIt))
++SplitIt;
BasicBlock *New = Old->splitBasicBlock(SplitIt, Old->getName()+".split");
+ New->setUnwindDest(Old->getUnwindDest());
// The new block lives in whichever loop the old one did.
if (Loop *L = LI.getLoopFor(Old))