mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +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:
parent
2655e6fd2e
commit
0e9e7fc0b2
@ -728,11 +728,6 @@ namespace {
|
|||||||
initializeLoopSimplifyPass(*PassRegistry::getPassRegistry());
|
initializeLoopSimplifyPass(*PassRegistry::getPassRegistry());
|
||||||
}
|
}
|
||||||
|
|
||||||
DominatorTree *DT;
|
|
||||||
LoopInfo *LI;
|
|
||||||
ScalarEvolution *SE;
|
|
||||||
AssumptionCache *AC;
|
|
||||||
|
|
||||||
bool runOnFunction(Function &F) override;
|
bool runOnFunction(Function &F) override;
|
||||||
|
|
||||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||||
@ -778,11 +773,13 @@ Pass *llvm::createLoopSimplifyPass() { return new LoopSimplify(); }
|
|||||||
///
|
///
|
||||||
bool LoopSimplify::runOnFunction(Function &F) {
|
bool LoopSimplify::runOnFunction(Function &F) {
|
||||||
bool Changed = false;
|
bool Changed = false;
|
||||||
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
|
LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
|
||||||
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||||
auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
|
auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>();
|
||||||
SE = SEWP ? &SEWP->getSE() : nullptr;
|
ScalarEvolution *SE = SEWP ? &SEWP->getSE() : nullptr;
|
||||||
AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
|
AssumptionCache *AC =
|
||||||
|
&getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
|
||||||
|
|
||||||
bool PreserveLCSSA = mustPreserveAnalysisID(LCSSAID);
|
bool PreserveLCSSA = mustPreserveAnalysisID(LCSSAID);
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (PreserveLCSSA) {
|
if (PreserveLCSSA) {
|
||||||
|
Loading…
Reference in New Issue
Block a user