aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-07-26 18:11:16 +0000
committerDan Gohman <gohman@apple.com>2010-07-26 18:11:16 +0000
commit170c519ff84c5b24877b1adfc9f8d29d1b5fd4d7 (patch)
tree58f6b3bd052fe6e2e779eebe5d4e11f4c9619d17 /lib/Transforms/Utils/LoopSimplify.cpp
parentdf4237fa224b73a08d6097ce5d642db6076d1847 (diff)
downloadexternal_llvm-170c519ff84c5b24877b1adfc9f8d29d1b5fd4d7.zip
external_llvm-170c519ff84c5b24877b1adfc9f8d29d1b5fd4d7.tar.gz
external_llvm-170c519ff84c5b24877b1adfc9f8d29d1b5fd4d7.tar.bz2
Remove LCSSA's bogus dependence on LoopSimplify and LoopSimplify's bogus
dependence on DominanceFrontier. Instead, add an explicit DominanceFrontier pass in StandardPasses.h to ensure that it gets scheduled at the right time. Declare that loop unrolling preserves ScalarEvolution, and shuffle some getAnalysisUsages. This eliminates one LoopSimplify and one LCCSA run in the standard compile opts sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109413 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r--lib/Transforms/Utils/LoopSimplify.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp
index 6b1eaad..1571fe8 100644
--- a/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/lib/Transforms/Utils/LoopSimplify.cpp
@@ -77,22 +77,17 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
// We need loop information to identify the loops...
- AU.addRequiredTransitive<DominatorTree>();
+ AU.addRequired<DominatorTree>();
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.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
AU.addPreserved<AliasAnalysis>();
AU.addPreserved<ScalarEvolution>();
AU.addPreservedID(BreakCriticalEdgesID); // No critical edges added.
+ AU.addPreserved<DominanceFrontier>();
+ AU.addPreservedID(LCSSAID);
}
/// verifyAnalysis() - Verify LoopSimplifyForm's guarantees.