mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Insert cloned loop basic blocks before original loop header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41713 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -145,7 +145,9 @@ Loop *llvm::CloneLoop(Loop *OrigL, LPPassManager *LPM, LoopInfo *LI,
|
|||||||
|
|
||||||
BasicBlock *Latch = OrigL->getLoopLatch();
|
BasicBlock *Latch = OrigL->getLoopLatch();
|
||||||
Function *F = Latch->getParent();
|
Function *F = Latch->getParent();
|
||||||
F->getBasicBlockList().insert(Latch, NewBlocks.begin(), NewBlocks.end());
|
F->getBasicBlockList().insert(OrigL->getHeader(),
|
||||||
|
NewBlocks.begin(), NewBlocks.end());
|
||||||
|
|
||||||
|
|
||||||
return NewParentLoop;
|
return NewParentLoop;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user