From 2365f08c7dfd039ef325d8cb4621b40fc5bd605f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 10 Nov 2010 22:35:02 +0000 Subject: [PATCH] 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 --- lib/Analysis/MemoryDependenceAnalysis.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 369175ceeb0..ea682ec029a 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) -- 2.34.1