summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/LCSSA.cpp18
-rw-r--r--llvm/lib/Transforms/Utils/LoopSimplify.cpp13
2 files changed, 17 insertions, 14 deletions
diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp
index e90c30bba78..5967cb9dc1b 100644
--- a/llvm/lib/Transforms/Utils/LCSSA.cpp
+++ b/llvm/lib/Transforms/Utils/LCSSA.cpp
@@ -64,22 +64,18 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
+ AU.addRequiredTransitive<DominatorTree>();
+ AU.addPreserved<DominatorTree>();
+ AU.addPreserved<DominanceFrontier>();
+ AU.addRequiredTransitive<LoopInfo>();
+ AU.addPreserved<LoopInfo>();
+
// LCSSA doesn't actually require LoopSimplify, but the PassManager
// doesn't know how to schedule LoopSimplify by itself.
AU.addRequiredID(LoopSimplifyID);
AU.addPreservedID(LoopSimplifyID);
- AU.addRequiredTransitive<LoopInfo>();
- AU.addPreserved<LoopInfo>();
- AU.addRequiredTransitive<DominatorTree>();
- AU.addPreserved<ScalarEvolution>();
- AU.addPreserved<DominatorTree>();
- // Request DominanceFrontier now, even though LCSSA does
- // not use it. This allows Pass Manager to schedule Dominance
- // Frontier early enough such that one LPPassManager can handle
- // multiple loop transformation passes.
- AU.addRequired<DominanceFrontier>();
- AU.addPreserved<DominanceFrontier>();
+ AU.addPreserved<ScalarEvolution>();
}
private:
bool ProcessInstruction(Instruction *Inst,
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 4f4edf3a754..703689e512e 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -77,12 +77,19 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
// We need loop information to identify the loops...
- AU.addRequiredTransitive<LoopInfo>();
AU.addRequiredTransitive<DominatorTree>();
-
- AU.addPreserved<LoopInfo>();
AU.addPreserved<DominatorTree>();
+
+ // Request DominanceFrontier now, even though LoopSimplify does
+ // not use it. This allows Pass Manager to schedule Dominance
+ // Frontier early enough such that one LPPassManager can handle
+ // multiple loop transformation passes.
+ AU.addRequired<DominanceFrontier>();
AU.addPreserved<DominanceFrontier>();
+
+ AU.addRequiredTransitive<LoopInfo>();
+ AU.addPreserved<LoopInfo>();
+
AU.addPreserved<AliasAnalysis>();
AU.addPreserved<ScalarEvolution>();
AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added.
OpenPOWER on IntegriCloud