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.

llvm-svn: 48085
This commit is contained in:
Nick Lewycky
2008-03-09 05:04:48 +00:00
parent 4d0ed842b1
commit cc24104703
3 changed files with 19 additions and 7 deletions

View File

@@ -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))