diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-02-10 01:07:54 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-02-10 01:07:54 +0000 |
commit | 58c8670ab2372e6549a4f18619ffcdee2d60093e (patch) | |
tree | 6d9b1e0cc04877ecc63afc303703840b92266d36 /llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | |
parent | 4bd19da5861b7dadae75a579d6320e393b34520d (diff) | |
download | bcm5719-llvm-58c8670ab2372e6549a4f18619ffcdee2d60093e.tar.gz bcm5719-llvm-58c8670ab2372e6549a4f18619ffcdee2d60093e.zip |
Turn this pass ordering:
Natural Loop Information
Loop Pass Manager
Canonicalize natural loops
Scalar Evolution Analysis
Loop Pass Manager
Induction Variable Users
Canonicalize natural loops
Induction Variable Users
Loop Strength Reduction
into this:
Scalar Evolution Analysis
Loop Pass Manager
Canonicalize natural loops
Induction Variable Users
Loop Strength Reduction
This fixes <rdar://problem/8869639>. I also filed PR9184 on doing this sort of
thing automatically, but it seems easier to just change the ordering of the
passes if this is the only case.
llvm-svn: 125254
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 01dcfaf0652..dcee08b5238 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -3815,15 +3815,15 @@ LoopStrengthReduce::LoopStrengthReduce(const TargetLowering *tli) void LoopStrengthReduce::getAnalysisUsage(AnalysisUsage &AU) const { // We split critical edges, so we change the CFG. However, we do update // many analyses if they are around. - AU.addPreservedID(LoopSimplifyID); - AU.addRequired<LoopInfo>(); - AU.addPreserved<LoopInfo>(); - AU.addRequiredID(LoopSimplifyID); AU.addRequired<DominatorTree>(); AU.addPreserved<DominatorTree>(); AU.addRequired<ScalarEvolution>(); AU.addPreserved<ScalarEvolution>(); + AU.addRequired<LoopInfo>(); + AU.addPreserved<LoopInfo>(); + AU.addRequiredID(LoopSimplifyID); + AU.addPreservedID(LoopSimplifyID); AU.addRequired<IVUsers>(); AU.addPreserved<IVUsers>(); } |