[llvm] r374026 - [LoopRotate] Unconditionally get ScalarEvolution.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 01:46:38 PDT 2019
Author: fhahn
Date: Tue Oct 8 01:46:38 2019
New Revision: 374026
URL: http://llvm.org/viewvc/llvm-project?rev=374026&view=rev
Log:
[LoopRotate] Unconditionally get ScalarEvolution.
Summary: LoopRotate is a loop pass and SE should always be available.
Reviewers: anemet, asbirlea
Reviewed By: asbirlea
Differential Revision: https://reviews.llvm.org/D68573
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=374026&r1=374025&r2=374026&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Tue Oct 8 01:46:38 2019
@@ -96,15 +96,14 @@ public:
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);
}
More information about the llvm-commits
mailing list