Lines Matching refs:Cache
737 static void AssertSorted(MemoryDependenceResults::NonLocalDepInfo &Cache, in AssertSorted() argument
740 Count = Cache.size(); in AssertSorted()
741 assert(std::is_sorted(Cache.begin(), Cache.begin() + Count) && in AssertSorted()
752 NonLocalDepInfo &Cache = CacheP.first; in getNonLocalCallDependency() local
759 if (!Cache.empty()) { in getNonLocalCallDependency()
764 return Cache; in getNonLocalCallDependency()
769 for (auto &Entry : Cache) in getNonLocalCallDependency()
774 std::sort(Cache.begin(), Cache.end()); in getNonLocalCallDependency()
792 unsigned NumSortedEntries = Cache.size(); in getNonLocalCallDependency()
793 DEBUG(AssertSorted(Cache)); in getNonLocalCallDependency()
806 DEBUG(AssertSorted(Cache, NumSortedEntries)); in getNonLocalCallDependency()
808 std::upper_bound(Cache.begin(), Cache.begin() + NumSortedEntries, in getNonLocalCallDependency()
810 if (Entry != Cache.begin() && std::prev(Entry)->getBB() == DirtyBB) in getNonLocalCallDependency()
814 if (Entry != Cache.begin() + NumSortedEntries && in getNonLocalCallDependency()
856 Cache.push_back(NonLocalDepEntry(DirtyBB, Dep)); in getNonLocalCallDependency()
874 return Cache; in getNonLocalCallDependency()
932 BasicBlock *BB, NonLocalDepInfo *Cache, unsigned NumSortedEntries) { in GetNonLocalInfoForBlock() argument
937 Cache->begin(), Cache->begin() + NumSortedEntries, NonLocalDepEntry(BB)); in GetNonLocalInfoForBlock()
938 if (Entry != Cache->begin() && (Entry - 1)->getBB() == BB) in GetNonLocalInfoForBlock()
942 if (Entry != Cache->begin() + NumSortedEntries && Entry->getBB() == BB) in GetNonLocalInfoForBlock()
978 Cache->push_back(NonLocalDepEntry(BB, Dep)); in GetNonLocalInfoForBlock()
1000 SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo &Cache, in SortNonLocalDepInfoCache() argument
1002 switch (Cache.size() - NumSortedEntries) { in SortNonLocalDepInfoCache()
1008 NonLocalDepEntry Val = Cache.back(); in SortNonLocalDepInfoCache()
1009 Cache.pop_back(); in SortNonLocalDepInfoCache()
1011 std::upper_bound(Cache.begin(), Cache.end() - 1, Val); in SortNonLocalDepInfoCache()
1012 Cache.insert(Entry, Val); in SortNonLocalDepInfoCache()
1017 if (Cache.size() != 1) { in SortNonLocalDepInfoCache()
1018 NonLocalDepEntry Val = Cache.back(); in SortNonLocalDepInfoCache()
1019 Cache.pop_back(); in SortNonLocalDepInfoCache()
1021 std::upper_bound(Cache.begin(), Cache.end(), Val); in SortNonLocalDepInfoCache()
1022 Cache.insert(Entry, Val); in SortNonLocalDepInfoCache()
1027 std::sort(Cache.begin(), Cache.end()); in SortNonLocalDepInfoCache()
1106 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB() local
1117 for (auto &Entry : *Cache) { in getNonLocalPointerDepFromBB()
1131 for (auto &Entry : *Cache) { in getNonLocalPointerDepFromBB()
1150 if (Cache->empty()) in getNonLocalPointerDepFromBB()
1166 unsigned NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1169 DEBUG(AssertSorted(*Cache)); in getNonLocalPointerDepFromBB()
1181 if (Cache && NumSortedEntries != Cache->size()) { in getNonLocalPointerDepFromBB()
1182 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1200 DEBUG(AssertSorted(*Cache, NumSortedEntries)); in getNonLocalPointerDepFromBB()
1202 Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1264 if (Cache && NumSortedEntries != Cache->size()) { in getNonLocalPointerDepFromBB()
1265 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1266 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1268 Cache = nullptr; in getNonLocalPointerDepFromBB()
1357 Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB()
1358 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1373 if (!Cache) { in getNonLocalPointerDepFromBB()
1376 Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB()
1377 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1395 for (NonLocalDepEntry &I : llvm::reverse(*Cache)) { in getNonLocalPointerDepFromBB()
1413 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1414 DEBUG(AssertSorted(*Cache)); in getNonLocalPointerDepFromBB()