summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-06-28 09:53:38 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-06-28 09:53:38 +0000
commit388af14f859b58a98c2400e4b4469922ea788d2f (patch)
tree35e001f338dea2f62da7b842d277d4e810af9eef /llvm/lib
parent488a894bde10351bdd71fbe88a585a7fe496a374 (diff)
downloadbcm5719-llvm-388af14f859b58a98c2400e4b4469922ea788d2f.tar.gz
bcm5719-llvm-388af14f859b58a98c2400e4b4469922ea788d2f.zip
[SCCP] Mark CFG as preserved.
SCCP does not change the CFG, so we can mark it as preserved. Reviewers: dberlin, efriedma, davide Reviewed By: davide Differential Revision: https://reviews.llvm.org/D47149 llvm-svn: 335820
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 33eb80734d1..af201257135 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1777,6 +1777,7 @@ PreservedAnalyses SCCPPass::run(Function &F, FunctionAnalysisManager &AM) {
auto PA = PreservedAnalyses();
PA.preserve<GlobalsAA>();
+ PA.preserveSet<CFGAnalyses>();
return PA;
}
@@ -1799,6 +1800,7 @@ public:
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<TargetLibraryInfoWrapperPass>();
AU.addPreserved<GlobalsAAWrapperPass>();
+ AU.setPreservesCFG();
}
// runOnFunction - Run the Sparse Conditional Constant Propagation
OpenPOWER on IntegriCloud