[llvm-commits] [llvm] r133959 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Andrew Trick
atrick at apple.com
Mon Jun 27 16:17:44 PDT 2011
Author: atrick
Date: Mon Jun 27 18:17:44 2011
New Revision: 133959
URL: http://llvm.org/viewvc/llvm-project?rev=133959&view=rev
Log:
indvars -disable-iv-rewrite: run RLEV after SimplifyIVUsers for
a bit more control over the order SCEVs are evaluated.
Modified:
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=133959&r1=133958&r2=133959&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Mon Jun 27 18:17:44 2011
@@ -1158,8 +1158,12 @@
// Create a rewriter object which we'll use to transform the code with.
SCEVExpander Rewriter(*SE);
- if (DisableIVRewrite)
+
+ // Eliminate redundant IV users.
+ if (DisableIVRewrite) {
Rewriter.disableCanonicalMode();
+ SimplifyIVUsersNoRewrite(L, Rewriter);
+ }
// Check to see if this loop has a computable loop-invariant execution count.
// If so, this means that we can compute the final value of any expressions
@@ -1171,9 +1175,7 @@
RewriteLoopExitValues(L, Rewriter);
// Eliminate redundant IV users.
- if (DisableIVRewrite)
- SimplifyIVUsersNoRewrite(L, Rewriter);
- else
+ if (!DisableIVRewrite)
SimplifyIVUsers(Rewriter);
// Compute the type of the largest recurrence expression, and decide whether
More information about the llvm-commits
mailing list