[llvm] r272818 - [LoopSimplify] Analyses do not need to be member variables.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 11:51:25 PDT 2016
Author: davide
Date: Wed Jun 15 13:51:25 2016
New Revision: 272818
URL: http://llvm.org/viewvc/llvm-project?rev=272818&view=rev
Log:
[LoopSimplify] Analyses do not need to be member variables.
In preparation for porting this pass to the new PM.
Modified:
llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=272818&r1=272817&r2=272818&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Wed Jun 15 13:51:25 2016
@@ -728,11 +728,6 @@ namespace {
initializeLoopSimplifyPass(*PassRegistry::getPassRegistry());
}
- DominatorTree *DT;
- LoopInfo *LI;
- ScalarEvolution *SE;
- AssumptionCache *AC;
-
bool runOnFunction(Function &F) override;
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -778,11 +773,13 @@ Pass *llvm::createLoopSimplifyPass() { r
///
bool LoopSimplify::runOnFunction(Function &F) {
bool Changed = false;
- LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
- DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
+ LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
+ DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
- SE = SEWP ? &SEWP->getSE() : nullptr;
- AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
+ ScalarEvolution *SE = SEWP ? &SEWP->getSE() : nullptr;
+ AssumptionCache *AC =
+ &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
+
bool PreserveLCSSA = mustPreserveAnalysisID(LCSSAID);
#ifndef NDEBUG
if (PreserveLCSSA) {
More information about the llvm-commits
mailing list