mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
indvars -disable-iv-rewrite: run RLEV after SimplifyIVUsers for
a bit more control over the order SCEVs are evaluated. llvm-svn: 133959
This commit is contained in:
parent
c4a49e5afd
commit
a2083f5887
@ -1158,8 +1158,12 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
|
||||
// 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 @@ bool IndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user