From 92c36965246d47ac7f636750e6f19ad2f24b8d2b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 18 Dec 2009 00:06:20 +0000 Subject: 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 --- llvm/lib/Analysis/IVUsers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Analysis/IVUsers.cpp') 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() { -- cgit v1.2.3