summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-16 17:58:45 +0000
committerDan Gohman <gohman@apple.com>2010-07-16 17:58:45 +0000
commitefd7f9c360ae90b4111030d94477579a8c8f79c5 (patch)
treef9675423198384e17c39ef32c9d8227284afd144 /llvm/lib/Transforms/Utils/LoopSimplify.cpp
parent1e936277c30f8c3df7fca5b52e7af2dd7bd474cb (diff)
downloadbcm5719-llvm-efd7f9c360ae90b4111030d94477579a8c8f79c5.tar.gz
bcm5719-llvm-efd7f9c360ae90b4111030d94477579a8c8f79c5.zip
Reorder the contents of various getAnalysisUsage functions, eliminating
a redundant loopsimplify run from the default -O2 sequence. llvm-svn: 108539
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopSimplify.cpp13
1 files changed, 10 insertions, 3 deletions
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