diff options
author | Dan Gohman <gohman@apple.com> | 2010-01-21 02:09:26 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-01-21 02:09:26 +0000 |
commit | 51ad99d2c514a8923a2519e37b43f774d95ef9a5 (patch) | |
tree | 4dedf54ab5c92f08d11a647e31a5f249f3abf4fc /llvm/lib/Analysis/IVUsers.cpp | |
parent | 626aba43d0960b8a99c1dd1680c866cc3f13bbf9 (diff) | |
download | bcm5719-llvm-51ad99d2c514a8923a2519e37b43f774d95ef9a5.tar.gz bcm5719-llvm-51ad99d2c514a8923a2519e37b43f774d95ef9a5.zip |
Re-implement the main strength-reduction portion of LoopStrengthReduction.
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.
It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.
llvm-svn: 94061
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
-rw-r--r-- | llvm/lib/Analysis/IVUsers.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp index 92f00273a2c..38611ccb621 100644 --- a/llvm/lib/Analysis/IVUsers.cpp +++ b/llvm/lib/Analysis/IVUsers.cpp @@ -324,12 +324,6 @@ const SCEV *IVUsers::getReplacementExpr(const IVStrideUse &U) const { // the actual replacement value. if (U.isUseOfPostIncrementedValue()) RetVal = SE->getAddExpr(RetVal, U.getParent()->Stride); - // Evaluate the expression out of the loop, if possible. - if (!L->contains(U.getUser())) { - const SCEV *ExitVal = SE->getSCEVAtScope(RetVal, L->getParentLoop()); - if (ExitVal->isLoopInvariant(L)) - RetVal = ExitVal; - } return RetVal; } |