Lines Matching defs:Cache
737 static void AssertSorted(MemoryDependenceResults::NonLocalDepInfo &Cache,
740 Count = Cache.size();
741 assert(std::is_sorted(Cache.begin(), Cache.begin() + Count) &&
742 "Cache isn't sorted!");
752 NonLocalDepInfo &Cache = CacheP.first;
759 if (!Cache.empty()) {
764 return Cache;
769 for (auto &Entry : Cache)
774 llvm::sort(Cache);
789 unsigned NumSortedEntries = Cache.size();
790 LLVM_DEBUG(AssertSorted(Cache));
802 LLVM_DEBUG(AssertSorted(Cache, NumSortedEntries));
804 std::upper_bound(Cache.begin(), Cache.begin() + NumSortedEntries,
806 if (Entry != Cache.begin() && std::prev(Entry)->getBB() == DirtyBB)
810 if (Entry != Cache.begin() + NumSortedEntries &&
851 Cache.push_back(NonLocalDepEntry(DirtyBB, Dep));
868 return Cache;
930 /// cached information in Cache or by doing a lookup (which may use dirty cache
936 BasicBlock *BB, NonLocalDepInfo *Cache, unsigned NumSortedEntries,
947 Cache->begin(), Cache->begin() + NumSortedEntries, NonLocalDepEntry(BB));
948 if (Entry != Cache->begin() && (Entry - 1)->getBB() == BB)
952 if (Entry != Cache->begin() + NumSortedEntries && Entry->getBB() == BB)
979 // Eliminating the dirty entry from 'Cache', so update the reverse info.
999 Cache->push_back(NonLocalDepEntry(BB, Dep));
1003 // to Cache!
1021 SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo &Cache,
1023 switch (Cache.size() - NumSortedEntries) {
1029 NonLocalDepEntry Val = Cache.back();
1030 Cache.pop_back();
1032 std::upper_bound(Cache.begin(), Cache.end() - 1, Val);
1033 Cache.insert(Entry, Val);
1038 if (Cache.size() != 1) {
1039 NonLocalDepEntry Val = Cache.back();
1040 Cache.pop_back();
1042 llvm::upper_bound(Cache, Val);
1043 Cache.insert(Entry, Val);
1048 llvm::sort(Cache);
1157 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps;
1171 for (auto &Entry : *Cache) {
1185 for (auto &Entry : *Cache) {
1208 if (!IsIncomplete && Cache->empty())
1225 unsigned NumSortedEntries = Cache->size();
1228 LLVM_DEBUG(AssertSorted(*Cache));
1240 if (Cache && NumSortedEntries != Cache->size()) {
1241 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1243 // Since we bail out, the "Cache" set won't contain all of the
1259 LLVM_DEBUG(AssertSorted(*Cache, NumSortedEntries));
1261 QueryInst, Loc, isLoad, BB, Cache, NumSortedEntries, BatchAA);
1323 if (Cache && NumSortedEntries != Cache->size()) {
1324 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1325 NumSortedEntries = Cache->size();
1327 Cache = nullptr;
1414 // Refresh the CacheInfo/Cache pointer so that it isn't invalidated.
1416 Cache = &CacheInfo->NonLocalDeps;
1417 NumSortedEntries = Cache->size();
1419 // Since we did phi translation, the "Cache" set won't contain all of the
1432 if (!Cache) {
1433 // Refresh the CacheInfo/Cache pointer if it got invalidated.
1435 Cache = &CacheInfo->NonLocalDeps;
1436 NumSortedEntries = Cache->size();
1439 // Since we failed phi translation, the "Cache" set won't contain all of the
1456 for (NonLocalDepEntry &I : llvm::reverse(*Cache)) {
1477 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1478 LLVM_DEBUG(AssertSorted(*Cache));
1519 // Eliminating the dirty entry from 'Cache', so update the reverse info.