Lines Matching refs:Cache
771 static void AssertSorted(MemoryDependenceResults::NonLocalDepInfo &Cache, in AssertSorted() argument
774 Count = Cache.size(); in AssertSorted()
775 assert(std::is_sorted(Cache.begin(), Cache.begin() + Count) && in AssertSorted()
786 NonLocalDepInfo &Cache = CacheP.first; in getNonLocalCallDependency() local
793 if (!Cache.empty()) { in getNonLocalCallDependency()
798 return Cache; in getNonLocalCallDependency()
803 for (auto &Entry : Cache) in getNonLocalCallDependency()
808 llvm::sort(Cache); in getNonLocalCallDependency()
826 unsigned NumSortedEntries = Cache.size(); in getNonLocalCallDependency()
827 LLVM_DEBUG(AssertSorted(Cache)); in getNonLocalCallDependency()
840 LLVM_DEBUG(AssertSorted(Cache, NumSortedEntries)); in getNonLocalCallDependency()
842 std::upper_bound(Cache.begin(), Cache.begin() + NumSortedEntries, in getNonLocalCallDependency()
844 if (Entry != Cache.begin() && std::prev(Entry)->getBB() == DirtyBB) in getNonLocalCallDependency()
848 if (Entry != Cache.begin() + NumSortedEntries && in getNonLocalCallDependency()
889 Cache.push_back(NonLocalDepEntry(DirtyBB, Dep)); in getNonLocalCallDependency()
907 return Cache; in getNonLocalCallDependency()
975 BasicBlock *BB, NonLocalDepInfo *Cache, unsigned NumSortedEntries) { in GetNonLocalInfoForBlock() argument
980 Cache->begin(), Cache->begin() + NumSortedEntries, NonLocalDepEntry(BB)); in GetNonLocalInfoForBlock()
981 if (Entry != Cache->begin() && (Entry - 1)->getBB() == BB) in GetNonLocalInfoForBlock()
985 if (Entry != Cache->begin() + NumSortedEntries && Entry->getBB() == BB) in GetNonLocalInfoForBlock()
1021 Cache->push_back(NonLocalDepEntry(BB, Dep)); in GetNonLocalInfoForBlock()
1043 SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo &Cache, in SortNonLocalDepInfoCache() argument
1045 switch (Cache.size() - NumSortedEntries) { in SortNonLocalDepInfoCache()
1051 NonLocalDepEntry Val = Cache.back(); in SortNonLocalDepInfoCache()
1052 Cache.pop_back(); in SortNonLocalDepInfoCache()
1054 std::upper_bound(Cache.begin(), Cache.end() - 1, Val); in SortNonLocalDepInfoCache()
1055 Cache.insert(Entry, Val); in SortNonLocalDepInfoCache()
1060 if (Cache.size() != 1) { in SortNonLocalDepInfoCache()
1061 NonLocalDepEntry Val = Cache.back(); in SortNonLocalDepInfoCache()
1062 Cache.pop_back(); in SortNonLocalDepInfoCache()
1064 std::upper_bound(Cache.begin(), Cache.end(), Val); in SortNonLocalDepInfoCache()
1065 Cache.insert(Entry, Val); in SortNonLocalDepInfoCache()
1070 llvm::sort(Cache); in SortNonLocalDepInfoCache()
1164 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB() local
1175 for (auto &Entry : *Cache) { in getNonLocalPointerDepFromBB()
1189 for (auto &Entry : *Cache) { in getNonLocalPointerDepFromBB()
1208 if (Cache->empty()) in getNonLocalPointerDepFromBB()
1224 unsigned NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1227 LLVM_DEBUG(AssertSorted(*Cache)); in getNonLocalPointerDepFromBB()
1239 if (Cache && NumSortedEntries != Cache->size()) { in getNonLocalPointerDepFromBB()
1240 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1258 LLVM_DEBUG(AssertSorted(*Cache, NumSortedEntries)); in getNonLocalPointerDepFromBB()
1260 Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1322 if (Cache && NumSortedEntries != Cache->size()) { in getNonLocalPointerDepFromBB()
1323 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1324 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1326 Cache = nullptr; in getNonLocalPointerDepFromBB()
1415 Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB()
1416 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1431 if (!Cache) { in getNonLocalPointerDepFromBB()
1434 Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB()
1435 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1453 for (NonLocalDepEntry &I : llvm::reverse(*Cache)) { in getNonLocalPointerDepFromBB()
1471 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1472 LLVM_DEBUG(AssertSorted(*Cache)); in getNonLocalPointerDepFromBB()