summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/IVUsers.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-18 00:06:20 +0000
committerDan Gohman <gohman@apple.com>2009-12-18 00:06:20 +0000
commit6bec5bb344fc0374431aed1cb63418de607a1aec (patch)
tree34e6fc8adb5783c34bdc50e1631af5351b264842 /lib/Analysis/IVUsers.cpp
parent79a8f3c3c73bf98c51f3378030b62aac90d876d7 (diff)
downloadexternal_llvm-6bec5bb344fc0374431aed1cb63418de607a1aec.zip
external_llvm-6bec5bb344fc0374431aed1cb63418de607a1aec.tar.gz
external_llvm-6bec5bb344fc0374431aed1cb63418de607a1aec.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91641 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IVUsers.cpp')
-rw-r--r--lib/Analysis/IVUsers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/IVUsers.cpp b/lib/Analysis/IVUsers.cpp
index 37747b6..c697df9 100644
--- a/lib/Analysis/IVUsers.cpp
+++ b/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() {