mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +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:
parent
a34d395358
commit
d24e5992e9
@ -145,7 +145,9 @@ Loop *llvm::CloneLoop(Loop *OrigL, LPPassManager *LPM, LoopInfo *LI,
|
||||
|
||||
BasicBlock *Latch = OrigL->getLoopLatch();
|
||||
Function *F = Latch->getParent();
|
||||
F->getBasicBlockList().insert(Latch, NewBlocks.begin(), NewBlocks.end());
|
||||
F->getBasicBlockList().insert(OrigL->getHeader(),
|
||||
NewBlocks.begin(), NewBlocks.end());
|
||||
|
||||
|
||||
return NewParentLoop;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user