summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2011-02-10 23:53:14 +0000
committerCameron Zwarich <zwarich@apple.com>2011-02-10 23:53:14 +0000
commit97dae4d361b96e10ff450c0dccab48d2bccb5685 (patch)
treeee3e47ff73abcc3be1d8217bee472cb189473c2f /llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
parentd8e66038f40920765469919b7168e19f72c368b5 (diff)
downloadbcm5719-llvm-97dae4d361b96e10ff450c0dccab48d2bccb5685.tar.gz
bcm5719-llvm-97dae4d361b96e10ff450c0dccab48d2bccb5685.zip
If we can't avoid running loop-simplify twice for now, at least avoid running
iv-users twice. llvm-svn: 125318
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 01dcfaf0652..ac4aea2e404 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -3824,6 +3824,9 @@ void LoopStrengthReduce::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addPreserved<DominatorTree>();
AU.addRequired<ScalarEvolution>();
AU.addPreserved<ScalarEvolution>();
+ // Requiring LoopSimplify a second time here prevents IVUsers from running
+ // twice, since LoopSimplify was invalidated by running ScalarEvolution.
+ AU.addRequiredID(LoopSimplifyID);
AU.addRequired<IVUsers>();
AU.addPreserved<IVUsers>();
}
OpenPOWER on IntegriCloud