mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-12 13:48:45 +00:00
LoopRotate: Fix use after scope bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
737d3b6aab
commit
3df4f544fe
@ -670,8 +670,9 @@ PreservedAnalyses LoopRotatePass::run(Loop &L, LoopAnalysisManager &AM,
|
||||
LPMUpdater &) {
|
||||
int Threshold = EnableHeaderDuplication ? DefaultRotationThreshold : 0;
|
||||
const DataLayout &DL = L.getHeader()->getModule()->getDataLayout();
|
||||
const SimplifyQuery SQ = getBestSimplifyQuery(AR, DL);
|
||||
LoopRotate LR(Threshold, &AR.LI, &AR.TTI, &AR.AC, &AR.DT, &AR.SE,
|
||||
getBestSimplifyQuery(AR, DL));
|
||||
SQ);
|
||||
|
||||
bool Changed = LR.processLoop(&L);
|
||||
if (!Changed)
|
||||
@ -714,8 +715,8 @@ public:
|
||||
auto *DT = DTWP ? &DTWP->getDomTree() : nullptr;
|
||||
auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
|
||||
auto *SE = SEWP ? &SEWP->getSE() : nullptr;
|
||||
LoopRotate LR(MaxHeaderSize, LI, TTI, AC, DT, SE,
|
||||
getBestSimplifyQuery(*this, F));
|
||||
const SimplifyQuery SQ = getBestSimplifyQuery(*this, F);
|
||||
LoopRotate LR(MaxHeaderSize, LI, TTI, AC, DT, SE, SQ);
|
||||
return LR.processLoop(L);
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user