From: Cameron Zwarich Date: Thu, 10 Feb 2011 23:53:14 +0000 (+0000) Subject: If we can't avoid running loop-simplify twice for now, at least avoid running X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c2b933037ecd5a0ebcfa3077606892802c04a29;p=llvm If we can't avoid running loop-simplify twice for now, at least avoid running iv-users twice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125318 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 01dcfaf0652..ac4aea2e404 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -3824,6 +3824,9 @@ void LoopStrengthReduce::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved(); AU.addRequired(); AU.addPreserved(); + // Requiring LoopSimplify a second time here prevents IVUsers from running + // twice, since LoopSimplify was invalidated by running ScalarEvolution. + AU.addRequiredID(LoopSimplifyID); AU.addRequired(); AU.addPreserved(); }