mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
LoopUnroll: Change code order of changes to new basic blocks
Add new basic blocks to `LoopInfo` earlier. No functionality change intended (simplifies upcoming bugfix patch). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219150 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
703bd8d0e2
commit
9aba1898be
@ -308,6 +308,8 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount,
|
||||
BasicBlock *New = CloneBasicBlock(*BB, VMap, "." + Twine(It));
|
||||
Header->getParent()->getBasicBlockList().push_back(New);
|
||||
|
||||
L->addBasicBlockToLoop(New, LI->getBase());
|
||||
|
||||
if (*BB == Header)
|
||||
// Loop over all of the PHI nodes in the block, changing them to use
|
||||
// the incoming values from the previous block.
|
||||
@ -327,8 +329,6 @@ bool llvm::UnrollLoop(Loop *L, unsigned Count, unsigned TripCount,
|
||||
VI != VE; ++VI)
|
||||
LastValueMap[VI->first] = VI->second;
|
||||
|
||||
L->addBasicBlockToLoop(New, LI->getBase());
|
||||
|
||||
// Add phi entries for newly created values to all exit blocks.
|
||||
for (succ_iterator SI = succ_begin(*BB), SE = succ_end(*BB);
|
||||
SI != SE; ++SI) {
|
||||
|
Loading…
Reference in New Issue
Block a user