Skip to content

Commit 9d305d7

Browse files
committed
[LoopSimplify] Analyses do not need to be member variables.
In preparation for porting this pass to the new PM. llvm-svn: 272818
1 parent a16fec1 commit 9d305d7

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

llvm/lib/Transforms/Utils/LoopSimplify.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,6 @@ namespace {
728728
initializeLoopSimplifyPass(*PassRegistry::getPassRegistry());
729729
}
730730

731-
DominatorTree *DT;
732-
LoopInfo *LI;
733-
ScalarEvolution *SE;
734-
AssumptionCache *AC;
735-
736731
bool runOnFunction(Function &F) override;
737732

738733
void getAnalysisUsage(AnalysisUsage &AU) const override {
@@ -778,11 +773,13 @@ Pass *llvm::createLoopSimplifyPass() { return new LoopSimplify(); }
778773
///
779774
bool LoopSimplify::runOnFunction(Function &F) {
780775
bool Changed = false;
781-
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
782-
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
776+
LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
777+
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
783778
auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
784-
SE = SEWP ? &SEWP->getSE() : nullptr;
785-
AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
779+
ScalarEvolution *SE = SEWP ? &SEWP->getSE() : nullptr;
780+
AssumptionCache *AC =
781+
&getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
782+
786783
bool PreserveLCSSA = mustPreserveAnalysisID(LCSSAID);
787784
#ifndef NDEBUG
788785
if (PreserveLCSSA) {

0 commit comments

Comments
 (0)