X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FMemoryDependenceAnalysis.cpp;h=881a25655406cbf2a431b2d88c6ec417e3525f7f;hb=f5a21eaa186efd2999b357de7b57e261f72a169b;hp=9207ca2c4f5a9269cdeb74b8cbf4bbc86933b62e;hpb=1af4bec1e2f9c52ecd8f22e5e4e44e2873358f72;p=oota-llvm.git diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 9207ca2c4f5..881a2565540 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -776,7 +776,7 @@ MemoryDependenceAnalysis::getNonLocalCallDependency(CallSite QueryCS) { DirtyBlocks.pop_back(); // Already processed this block? - if (!Visited.insert(DirtyBB)) + if (!Visited.insert(DirtyBB).second) continue; // Do a binary search to see if we already have an entry for this block in @@ -1145,7 +1145,6 @@ getNonLocalPointerDepFromBB(const PHITransAddr &Pointer, // cache value will only see properly sorted cache arrays. if (Cache && NumSortedEntries != Cache->size()) { SortNonLocalDepInfoCache(*Cache, NumSortedEntries); - NumSortedEntries = Cache->size(); } // Since we bail out, the "Cache" set won't contain all of the // results for the query. This is ok (we can still use it to accelerate @@ -1361,7 +1360,7 @@ getNonLocalPointerDepFromBB(const PHITransAddr &Pointer, if (I->getBB() != BB) continue; - assert(I->getResult().isNonLocal() && + assert((I->getResult().isNonLocal() || !DT->isReachableFromEntry(BB)) && "Should only be here with transparent block"); I->setResult(MemDepResult::getUnknown()); Result.push_back(NonLocalDepResult(I->getBB(), I->getResult(),