diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-10 22:35:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-10 22:35:02 +0000 |
commit | 2365f08c7dfd039ef325d8cb4621b40fc5bd605f (patch) | |
tree | 922cefd2a89e9132968183a81c05eb8a2c595b9e /lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 1d739a010d49914eae7b6c415dd6de76ca142030 (diff) |
When clearing a non-local pointer dependency cache entry, clear
the reverse map too. This fixes seflhost build errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118729 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 369175ceeb..ea682ec029 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -783,6 +783,10 @@ getNonLocalPointerDepFromBB(const PHITransAddr &Pointer, // cached data and procede with the query at the greater size. CacheInfo->Pair = BBSkipFirstBlockPair(); CacheInfo->Size = Loc.Size; + for (NonLocalDepInfo::iterator DI = CacheInfo->NonLocalDeps.begin(), + DE = CacheInfo->NonLocalDeps.end(); DI != DE; ++DI) + if (Instruction *Inst = DI->getResult().getInst()) + RemoveFromReverseMap(ReverseNonLocalPtrDeps, Inst, CacheKey); CacheInfo->NonLocalDeps.clear(); } else if (CacheInfo->Size > Loc.Size) { // This query's Size is less than the cached one. Conservatively restart @@ -800,6 +804,10 @@ getNonLocalPointerDepFromBB(const PHITransAddr &Pointer, if (CacheInfo->TBAATag) { CacheInfo->Pair = BBSkipFirstBlockPair(); CacheInfo->TBAATag = 0; + for (NonLocalDepInfo::iterator DI = CacheInfo->NonLocalDeps.begin(), + DE = CacheInfo->NonLocalDeps.end(); DI != DE; ++DI) + if (Instruction *Inst = DI->getResult().getInst()) + RemoveFromReverseMap(ReverseNonLocalPtrDeps, Inst, CacheKey); CacheInfo->NonLocalDeps.clear(); } if (Loc.TBAATag) |