1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

[LoopSimplify] Analyses do not need to be member variables.

In preparation for porting this pass to the new PM.

llvm-svn: 272818
This commit is contained in:
Davide Italiano 2016-06-15 18:51:25 +00:00
parent 2655e6fd2e
commit 0e9e7fc0b2

View File

@ -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() { return new LoopSimplify(); }
///
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) {