mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Invoke SimplifyIndVar when we partially unroll a loop. Fixes PR10534.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -79,6 +79,7 @@ namespace {
|
||||
AU.addPreservedID(LoopSimplifyID);
|
||||
AU.addRequiredID(LCSSAID);
|
||||
AU.addPreservedID(LCSSAID);
|
||||
AU.addRequired<ScalarEvolution>();
|
||||
AU.addPreserved<ScalarEvolution>();
|
||||
// FIXME: Loop unroll requires LCSSA. And LCSSA requires dom info.
|
||||
// If loop unroll does not preserve dom info then LCSSA pass on next
|
||||
@@ -187,12 +188,8 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
}
|
||||
|
||||
// Unroll the loop.
|
||||
Function *F = L->getHeader()->getParent();
|
||||
if (!UnrollLoop(L, Count, TripCount, TripMultiple, LI, &LPM))
|
||||
return false;
|
||||
|
||||
// FIXME: Reconstruct dom info, because it is not preserved properly.
|
||||
if (DominatorTree *DT = getAnalysisIfAvailable<DominatorTree>())
|
||||
DT->runOnFunction(*F);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user