Lines Matching refs:Cache

708 static void AssertSorted(MemoryDependenceResults::NonLocalDepInfo &Cache,
711 Count = Cache.size();
712 assert(std::is_sorted(Cache.begin(), Cache.begin() + Count) &&
713 "Cache isn't sorted!");
723 NonLocalDepInfo &Cache = CacheP.first;
730 if (!Cache.empty()) {
735 return Cache;
740 for (auto &Entry : Cache)
745 llvm::sort(Cache);
760 unsigned NumSortedEntries = Cache.size();
761 LLVM_DEBUG(AssertSorted(Cache));
773 LLVM_DEBUG(AssertSorted(Cache, NumSortedEntries));
775 std::upper_bound(Cache.begin(), Cache.begin() + NumSortedEntries,
777 if (Entry != Cache.begin() && std::prev(Entry)->getBB() == DirtyBB)
781 if (Entry != Cache.begin() + NumSortedEntries &&
822 Cache.push_back(NonLocalDepEntry(DirtyBB, Dep));
839 return Cache;
901 /// cached information in Cache or by doing a lookup (which may use dirty cache
907 BasicBlock *BB, NonLocalDepInfo *Cache, unsigned NumSortedEntries,
918 Cache->begin(), Cache->begin() + NumSortedEntries, NonLocalDepEntry(BB));
919 if (Entry != Cache->begin() && (Entry - 1)->getBB() == BB)
923 if (Entry != Cache->begin() + NumSortedEntries && Entry->getBB() == BB)
950 // Eliminating the dirty entry from 'Cache', so update the reverse info.
970 Cache->push_back(NonLocalDepEntry(BB, Dep));
974 // to Cache!
992 SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo &Cache,
994 switch (Cache.size() - NumSortedEntries) {
1000 NonLocalDepEntry Val = Cache.back();
1001 Cache.pop_back();
1003 std::upper_bound(Cache.begin(), Cache.end() - 1, Val);
1004 Cache.insert(Entry, Val);
1009 if (Cache.size() != 1) {
1010 NonLocalDepEntry Val = Cache.back();
1011 Cache.pop_back();
1013 llvm::upper_bound(Cache, Val);
1014 Cache.insert(Entry, Val);
1019 llvm::sort(Cache);
1106 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps;
1120 for (auto &Entry : *Cache) {
1134 for (auto &Entry : *Cache) {
1157 if (!IsIncomplete && Cache->empty())
1174 unsigned NumSortedEntries = Cache->size();
1177 LLVM_DEBUG(AssertSorted(*Cache));
1189 if (Cache && NumSortedEntries != Cache->size()) {
1190 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1192 // Since we bail out, the "Cache" set won't contain all of the
1208 LLVM_DEBUG(AssertSorted(*Cache, NumSortedEntries));
1210 QueryInst, Loc, isLoad, BB, Cache, NumSortedEntries, BatchAA);
1272 if (Cache && NumSortedEntries != Cache->size()) {
1273 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1274 NumSortedEntries = Cache->size();
1276 Cache = nullptr;
1363 // Refresh the CacheInfo/Cache pointer so that it isn't invalidated.
1365 Cache = &CacheInfo->NonLocalDeps;
1366 NumSortedEntries = Cache->size();
1368 // Since we did phi translation, the "Cache" set won't contain all of the
1381 if (!Cache) {
1382 // Refresh the CacheInfo/Cache pointer if it got invalidated.
1384 Cache = &CacheInfo->NonLocalDeps;
1385 NumSortedEntries = Cache->size();
1388 // Since we failed phi translation, the "Cache" set won't contain all of the
1405 for (NonLocalDepEntry &I : llvm::reverse(*Cache)) {
1426 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1427 LLVM_DEBUG(AssertSorted(*Cache));
1468 // Eliminating the dirty entry from 'Cache', so update the reverse info.