[llvm-commits] [llvm] r63201 - /llvm/branches/release_25/lib/Analysis/MemoryDependenceAnalysis.cpp
Tanya Lattner
tonic at nondot.org
Wed Jan 28 07:22:28 PST 2009
Author: tbrethou
Date: Wed Jan 28 09:22:24 2009
New Revision: 63201
URL: http://llvm.org/viewvc/llvm-project?rev=63201&view=rev
Log:
a minor tweak to my previous patch, handle the invalidation case
when there are multiple iterations of the loop. This fixes PR3375.
Modified:
llvm/branches/release_25/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/branches/release_25/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_25/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=63201&r1=63200&r2=63201&view=diff
==============================================================================
--- llvm/branches/release_25/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/branches/release_25/lib/Analysis/MemoryDependenceAnalysis.cpp Wed Jan 28 09:22:24 2009
@@ -751,9 +751,10 @@
// cache remains sorted. Sort it now (if needed) so that recursive
// invocations of getNonLocalPointerDepFromBB that could reuse the cache
// value will only see properly sorted cache arrays.
- if (NumSortedEntries != Cache->size()) {
+ if (Cache && NumSortedEntries != Cache->size()) {
std::sort(Cache->begin(), Cache->end());
NumSortedEntries = Cache->size();
+ Cache = 0;
}
// FIXME: it is entirely possible that PHI translating will end up with
@@ -767,12 +768,12 @@
Result, Visited))
goto PredTranslationFailure;
}
-
+
// Refresh the CacheInfo/Cache pointer so that it isn't invalidated.
CacheInfo = &NonLocalPointerDeps[CacheKey];
Cache = &CacheInfo->second;
NumSortedEntries = Cache->size();
-
+
// Since we did phi translation, the "Cache" set won't contain all of the
// results for the query. This is ok (we can still use it to accelerate
// specific block queries) but we can't do the fastpath "return all
More information about the llvm-commits
mailing list