mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-27 22:55:15 +00:00
Reorder the contents of various getAnalysisUsage functions, eliminating
a redundant loopsimplify run from the default -O2 sequence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108539 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9c3d5e41b9
commit
1e381fcd55
@ -75,10 +75,10 @@ namespace {
|
||||
///
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesCFG();
|
||||
AU.addRequiredID(LoopSimplifyID);
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.addRequired<DominatorTree>();
|
||||
AU.addRequired<DominanceFrontier>(); // For scalar promotion (mem2reg)
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.addRequiredID(LoopSimplifyID);
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
AU.addPreserved<ScalarEvolution>();
|
||||
AU.addPreserved<DominanceFrontier>();
|
||||
|
@ -43,15 +43,15 @@ namespace {
|
||||
|
||||
// LCSSA form makes instruction renaming easier.
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addPreserved<DominatorTree>();
|
||||
AU.addPreserved<DominanceFrontier>();
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.addPreserved<LoopInfo>();
|
||||
AU.addRequiredID(LoopSimplifyID);
|
||||
AU.addPreservedID(LoopSimplifyID);
|
||||
AU.addRequiredID(LCSSAID);
|
||||
AU.addPreservedID(LCSSAID);
|
||||
AU.addPreserved<ScalarEvolution>();
|
||||
AU.addRequired<LoopInfo>();
|
||||
AU.addPreserved<LoopInfo>();
|
||||
AU.addPreserved<DominatorTree>();
|
||||
AU.addPreserved<DominanceFrontier>();
|
||||
}
|
||||
|
||||
// Helper functions
|
||||
|
@ -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,
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user