mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
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
This commit is contained in:
@ -396,10 +396,14 @@ bool LoopUnroll::unrollLoop(Loop *L, unsigned Count, unsigned Threshold) {
|
||||
}
|
||||
|
||||
// Remap all instructions in the most recent iteration
|
||||
for (unsigned i = 0; i < NewBlocks.size(); ++i)
|
||||
for (BasicBlock::iterator I = NewBlocks[i]->begin(),
|
||||
E = NewBlocks[i]->end(); I != E; ++I)
|
||||
for (unsigned i = 0; i < NewBlocks.size(); ++i) {
|
||||
BasicBlock *NB = NewBlocks[i];
|
||||
if (BasicBlock *UnwindDest = NB->getUnwindDest())
|
||||
NB->setUnwindDest(cast<BasicBlock>(LastValueMap[UnwindDest]));
|
||||
|
||||
for (BasicBlock::iterator I = NB->begin(), E = NB->end(); I != E; ++I)
|
||||
RemapInstruction(I, LastValueMap);
|
||||
}
|
||||
}
|
||||
|
||||
// The latch block exits the loop. If there are any PHI nodes in the
|
||||
|
Reference in New Issue
Block a user