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
This commit is contained in:
Dan Gohman
2009-12-18 00:06:20 +00:00
parent 79a8f3c3c7
commit 6bec5bb344
4 changed files with 34 additions and 80 deletions
+2 -1
View File
@@ -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() {