diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2008-03-09 05:24:34 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2008-03-09 05:24:34 +0000 |
commit | 529de8a45702cd34968d79d13f95ed1e5d5fa250 (patch) | |
tree | 31fa91f8bc4b9823103028f53a42918b300e285f /lib/Transforms/Utils/CloneLoop.cpp | |
parent | 6af31aab63583e61b7c7b51bc285541750bd834f (diff) |
Update the block cloner which fixes bugpoint on code using unwind_to (phew!)
and also update the cloning interface's major user, the loop optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneLoop.cpp')
-rw-r--r-- | lib/Transforms/Utils/CloneLoop.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/CloneLoop.cpp b/lib/Transforms/Utils/CloneLoop.cpp index d52d79598f..7b3359b2f9 100644 --- a/lib/Transforms/Utils/CloneLoop.cpp +++ b/lib/Transforms/Utils/CloneLoop.cpp @@ -130,6 +130,10 @@ Loop *llvm::CloneLoop(Loop *OrigL, LPPassManager *LPM, LoopInfo *LI, for(SmallVector<BasicBlock *, 16>::iterator NBItr = NewBlocks.begin(), NBE = NewBlocks.end(); NBItr != NBE; ++NBItr) { BasicBlock *NB = *NBItr; + + if (BasicBlock *UnwindDest = NB->getUnwindDest()) + NB->setUnwindDest(cast<BasicBlock>(ValueMap[UnwindDest])); + for(BasicBlock::iterator BI = NB->begin(), BE = NB->end(); BI != BE; ++BI) { Instruction *Insn = BI; |