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
This commit is contained in:
Dan Gohman
2010-07-26 18:11:16 +00:00
parent 572365ec88
commit 052f000158
5 changed files with 16 additions and 20 deletions

View File

@@ -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.