From 58c8670ab2372e6549a4f18619ffcdee2d60093e Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Thu, 10 Feb 2011 01:07:54 +0000 Subject: [PATCH] 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 . 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 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 01dcfaf06527..dcee08b52381 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(); - AU.addPreserved(); - AU.addRequiredID(LoopSimplifyID); AU.addRequired(); AU.addPreserved(); AU.addRequired(); AU.addPreserved(); + AU.addRequired(); + AU.addPreserved(); + AU.addRequiredID(LoopSimplifyID); + AU.addPreservedID(LoopSimplifyID); AU.addRequired(); AU.addPreserved(); }