diff options
| author | Dan Gohman <gohman@apple.com> | 2009-12-18 00:06:20 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-12-18 00:06:20 +0000 |
| commit | 92c36965246d47ac7f636750e6f19ad2f24b8d2b (patch) | |
| tree | 2dc1973a36f09d167055366ac20e855e9e0a2dad /llvm/lib/Analysis/IVUsers.cpp | |
| parent | 12ca3f46d871daec9d05fc15d29432c3cea96b75 (diff) | |
| download | bcm5719-llvm-92c36965246d47ac7f636750e6f19ad2f24b8d2b.tar.gz bcm5719-llvm-92c36965246d47ac7f636750e6f19ad2f24b8d2b.zip | |
Reapply LoopStrengthReduce and IVUsers cleanups, excluding the part
of 91296 that caused trouble -- the Processed list needs to be
preserved for the livetime of the pass, as AddUsersIfInteresting
is called from other passes.
llvm-svn: 91641
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
| -rw-r--r-- | llvm/lib/Analysis/IVUsers.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp index 37747b65174..c697df93688 100644 --- a/llvm/lib/Analysis/IVUsers.cpp +++ b/llvm/lib/Analysis/IVUsers.cpp @@ -53,7 +53,7 @@ static bool containsAddRecFromDifferentLoop(const SCEV *S, Loop *L) { if (newLoop == L) return false; // if newLoop is an outer loop of L, this is OK. - if (!LoopInfo::isNotAlreadyContainedIn(L, newLoop)) + if (newLoop->contains(L->getHeader())) return false; } return true; @@ -370,6 +370,7 @@ void IVUsers::releaseMemory() { IVUsesByStride.clear(); StrideOrder.clear(); Processed.clear(); + IVUses.clear(); } void IVStrideUse::deleted() { |

