summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/SCCP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/IPO/SCCP.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/SCCP.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/llvm/lib/Transforms/IPO/SCCP.cpp b/llvm/lib/Transforms/IPO/SCCP.cpp
index e2bb6f185c3..cc53c4b8c46 100644
--- a/llvm/lib/Transforms/IPO/SCCP.cpp
+++ b/llvm/lib/Transforms/IPO/SCCP.cpp
@@ -1,5 +1,4 @@
#include "llvm/Transforms/IPO/SCCP.h"
-#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Scalar/SCCP.h"
@@ -9,15 +8,7 @@ using namespace llvm;
PreservedAnalyses IPSCCPPass::run(Module &M, ModuleAnalysisManager &AM) {
const DataLayout &DL = M.getDataLayout();
auto &TLI = AM.getResult<TargetLibraryAnalysis>(M);
- auto &FAM = AM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
- auto getPredicateInfo =
- [&FAM](Function &F) -> std::unique_ptr<PredicateInfo> {
- return make_unique<PredicateInfo>(F,
- FAM.getResult<DominatorTreeAnalysis>(F),
- FAM.getResult<AssumptionAnalysis>(F));
- };
-
- if (!runIPSCCP(M, DL, &TLI, getPredicateInfo))
+ if (!runIPSCCP(M, DL, &TLI))
return PreservedAnalyses::all();
return PreservedAnalyses::none();
}
@@ -43,20 +34,10 @@ public:
const DataLayout &DL = M.getDataLayout();
const TargetLibraryInfo *TLI =
&getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
-
- auto getPredicateInfo =
- [this](Function &F) -> std::unique_ptr<PredicateInfo> {
- return make_unique<PredicateInfo>(
- F, this->getAnalysis<DominatorTreeWrapperPass>(F).getDomTree(),
- this->getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F));
- };
-
- return runIPSCCP(M, DL, TLI, getPredicateInfo);
+ return runIPSCCP(M, DL, TLI);
}
void getAnalysisUsage(AnalysisUsage &AU) const override {
- AU.addRequired<AssumptionCacheTracker>();
- AU.addRequired<DominatorTreeWrapperPass>();
AU.addRequired<TargetLibraryInfoWrapperPass>();
}
};
@@ -68,7 +49,6 @@ char IPSCCPLegacyPass::ID = 0;
INITIALIZE_PASS_BEGIN(IPSCCPLegacyPass, "ipsccp",
"Interprocedural Sparse Conditional Constant Propagation",
false, false)
-INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)
INITIALIZE_PASS_END(IPSCCPLegacyPass, "ipsccp",
"Interprocedural Sparse Conditional Constant Propagation",
OpenPOWER on IntegriCloud