diff options
author | Hal Finkel <hfinkel@anl.gov> | 2016-12-15 03:02:15 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2016-12-15 03:02:15 +0000 |
commit | 3ca4a6bcf11d6b4ac34fed640f3ab23995ec1877 (patch) | |
tree | 4594d31d24d9535dd4f5198505a25dd88c0f8fb5 /llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp | |
parent | cb9f78e1c3951337de4ba24902eced2c72184319 (diff) | |
download | bcm5719-llvm-3ca4a6bcf11d6b4ac34fed640f3ab23995ec1877.tar.gz bcm5719-llvm-3ca4a6bcf11d6b4ac34fed640f3ab23995ec1877.zip |
Remove the AssumptionCache
After r289755, the AssumptionCache is no longer needed. Variables affected by
assumptions are now found by using the new operand-bundle-based scheme. This
new scheme is more computationally efficient, and also we need much less
code...
llvm-svn: 289756
Diffstat (limited to 'llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp b/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp index 82cfbd16ca3..31503a00379 100644 --- a/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp +++ b/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp @@ -24,7 +24,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Analysis/GlobalsModRef.h" -#include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" #include "llvm/Analysis/ValueTracking.h" @@ -54,7 +53,6 @@ struct AlignmentFromAssumptions : public FunctionPass { bool runOnFunction(Function &F) override; void getAnalysisUsage(AnalysisUsage &AU) const override { - AU.addRequired<AssumptionCacheTracker>(); AU.addRequired<ScalarEvolutionWrapperPass>(); AU.addRequired<DominatorTreeWrapperPass>(); @@ -74,7 +72,6 @@ char AlignmentFromAssumptions::ID = 0; static const char aip_name[] = "Alignment from assumptions"; INITIALIZE_PASS_BEGIN(AlignmentFromAssumptions, AA_NAME, aip_name, false, false) -INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker) INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass) INITIALIZE_PASS_DEPENDENCY(ScalarEvolutionWrapperPass) INITIALIZE_PASS_END(AlignmentFromAssumptions, AA_NAME, @@ -408,15 +405,13 @@ bool AlignmentFromAssumptions::runOnFunction(Function &F) { if (skipFunction(F)) return false; - auto &AC = getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F); ScalarEvolution *SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); - return Impl.runImpl(F, AC, SE, DT); + return Impl.runImpl(F, SE, DT); } -bool AlignmentFromAssumptionsPass::runImpl(Function &F, AssumptionCache &AC, - ScalarEvolution *SE_, +bool AlignmentFromAssumptionsPass::runImpl(Function &F, ScalarEvolution *SE_, DominatorTree *DT_) { SE = SE_; DT = DT_; @@ -438,10 +433,9 @@ bool AlignmentFromAssumptionsPass::runImpl(Function &F, AssumptionCache &AC, PreservedAnalyses AlignmentFromAssumptionsPass::run(Function &F, FunctionAnalysisManager &AM) { - AssumptionCache &AC = AM.getResult<AssumptionAnalysis>(F); ScalarEvolution &SE = AM.getResult<ScalarEvolutionAnalysis>(F); DominatorTree &DT = AM.getResult<DominatorTreeAnalysis>(F); - bool Changed = runImpl(F, AC, &SE, &DT); + bool Changed = runImpl(F, &SE, &DT); // FIXME: We need to invalidate this to avoid PR28400. Is there a better // solution? |