forked from OSchip/llvm-project
Insert cloned loop basic blocks before original loop header.
llvm-svn: 41713
This commit is contained in:
parent
e0cb6bb8da
commit
f6ef552f3d
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue