[PATCH] D68573: [LoopRotate] Unconditionally get ScalarEvolution.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 06:07:24 PDT 2019
fhahn created this revision.
fhahn added reviewers: anemet, asbirlea.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
LoopRotate is a loop pass and SE should always be available.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68573
Files:
llvm/lib/Transforms/Scalar/LoopRotation.cpp
Index: llvm/lib/Transforms/Scalar/LoopRotation.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopRotation.cpp
+++ llvm/lib/Transforms/Scalar/LoopRotation.cpp
@@ -96,15 +96,14 @@
auto *AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
auto *DTWP = getAnalysisIfAvailable<DominatorTreeWrapperPass>();
auto *DT = DTWP ? &DTWP->getDomTree() : nullptr;
- auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
- auto *SE = SEWP ? &SEWP->getSE() : nullptr;
+ auto &SE = getAnalysis<ScalarEvolutionWrapperPass>().getSE();
const SimplifyQuery SQ = getBestSimplifyQuery(*this, F);
Optional<MemorySSAUpdater> MSSAU;
if (EnableMSSALoopDependency) {
MemorySSA *MSSA = &getAnalysis<MemorySSAWrapperPass>().getMSSA();
MSSAU = MemorySSAUpdater(MSSA);
}
- return LoopRotation(L, LI, TTI, AC, DT, SE,
+ return LoopRotation(L, LI, TTI, AC, DT, &SE,
MSSAU.hasValue() ? MSSAU.getPointer() : nullptr, SQ,
false, MaxHeaderSize, false);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68573.223540.patch
Type: text/x-patch
Size: 1119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191007/f7726efb/attachment.bin>
More information about the llvm-commits
mailing list