Lines Matching refs:Cache
792 static void AssertSorted(MemoryDependenceAnalysis::NonLocalDepInfo &Cache, in AssertSorted() argument
794 if (Count == -1) Count = Cache.size(); in AssertSorted()
798 assert(!(Cache[i] < Cache[i-1]) && "Cache isn't sorted!"); in AssertSorted()
819 NonLocalDepInfo &Cache = CacheP.first; in getNonLocalCallDependency() local
827 if (!Cache.empty()) { in getNonLocalCallDependency()
832 return Cache; in getNonLocalCallDependency()
837 for (NonLocalDepInfo::iterator I = Cache.begin(), E = Cache.end(); in getNonLocalCallDependency()
843 std::sort(Cache.begin(), Cache.end()); in getNonLocalCallDependency()
861 unsigned NumSortedEntries = Cache.size(); in getNonLocalCallDependency()
862 DEBUG(AssertSorted(Cache)); in getNonLocalCallDependency()
875 DEBUG(AssertSorted(Cache, NumSortedEntries)); in getNonLocalCallDependency()
877 std::upper_bound(Cache.begin(), Cache.begin()+NumSortedEntries, in getNonLocalCallDependency()
879 if (Entry != Cache.begin() && std::prev(Entry)->getBB() == DirtyBB) in getNonLocalCallDependency()
883 if (Entry != Cache.begin()+NumSortedEntries && in getNonLocalCallDependency()
924 Cache.push_back(NonLocalDepEntry(DirtyBB, Dep)); in getNonLocalCallDependency()
942 return Cache; in getNonLocalCallDependency()
1009 BasicBlock *BB, NonLocalDepInfo *Cache, unsigned NumSortedEntries) { in GetNonLocalInfoForBlock() argument
1014 std::upper_bound(Cache->begin(), Cache->begin()+NumSortedEntries, in GetNonLocalInfoForBlock()
1016 if (Entry != Cache->begin() && (Entry-1)->getBB() == BB) in GetNonLocalInfoForBlock()
1020 if (Entry != Cache->begin()+NumSortedEntries && Entry->getBB() == BB) in GetNonLocalInfoForBlock()
1056 Cache->push_back(NonLocalDepEntry(BB, Dep)); in GetNonLocalInfoForBlock()
1077 SortNonLocalDepInfoCache(MemoryDependenceAnalysis::NonLocalDepInfo &Cache, in SortNonLocalDepInfoCache() argument
1079 switch (Cache.size() - NumSortedEntries) { in SortNonLocalDepInfoCache()
1085 NonLocalDepEntry Val = Cache.back(); in SortNonLocalDepInfoCache()
1086 Cache.pop_back(); in SortNonLocalDepInfoCache()
1088 std::upper_bound(Cache.begin(), Cache.end()-1, Val); in SortNonLocalDepInfoCache()
1089 Cache.insert(Entry, Val); in SortNonLocalDepInfoCache()
1094 if (Cache.size() != 1) { in SortNonLocalDepInfoCache()
1095 NonLocalDepEntry Val = Cache.back(); in SortNonLocalDepInfoCache()
1096 Cache.pop_back(); in SortNonLocalDepInfoCache()
1098 std::upper_bound(Cache.begin(), Cache.end(), Val); in SortNonLocalDepInfoCache()
1099 Cache.insert(Entry, Val); in SortNonLocalDepInfoCache()
1104 std::sort(Cache.begin(), Cache.end()); in SortNonLocalDepInfoCache()
1186 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB() local
1197 for (NonLocalDepInfo::iterator I = Cache->begin(), E = Cache->end(); in getNonLocalPointerDepFromBB()
1211 for (NonLocalDepInfo::iterator I = Cache->begin(), E = Cache->end(); in getNonLocalPointerDepFromBB()
1234 if (Cache->empty()) in getNonLocalPointerDepFromBB()
1250 unsigned NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1251 DEBUG(AssertSorted(*Cache)); in getNonLocalPointerDepFromBB()
1263 if (Cache && NumSortedEntries != Cache->size()) { in getNonLocalPointerDepFromBB()
1264 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1282 DEBUG(AssertSorted(*Cache, NumSortedEntries)); in getNonLocalPointerDepFromBB()
1284 Loc, isLoad, BB, Cache, in getNonLocalPointerDepFromBB()
1343 if (Cache && NumSortedEntries != Cache->size()) { in getNonLocalPointerDepFromBB()
1344 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1345 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1347 Cache = nullptr; in getNonLocalPointerDepFromBB()
1437 Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB()
1438 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1453 if (!Cache) { in getNonLocalPointerDepFromBB()
1456 Cache = &CacheInfo->NonLocalDeps; in getNonLocalPointerDepFromBB()
1457 NumSortedEntries = Cache->size(); in getNonLocalPointerDepFromBB()
1474 for (NonLocalDepInfo::reverse_iterator I = Cache->rbegin(); ; ++I) { in getNonLocalPointerDepFromBB()
1475 assert(I != Cache->rend() && "Didn't find current block??"); in getNonLocalPointerDepFromBB()
1489 SortNonLocalDepInfoCache(*Cache, NumSortedEntries); in getNonLocalPointerDepFromBB()
1490 DEBUG(AssertSorted(*Cache)); in getNonLocalPointerDepFromBB()