Lines Matching refs:Cache

589 static void AssertSorted(MemoryDependenceAnalysis::NonLocalDepInfo &Cache,
591 if (Count == -1) Count = Cache.size();
595 assert(!(Cache[i] < Cache[i-1]) && "Cache isn't sorted!");
616 NonLocalDepInfo &Cache = CacheP.first;
624 if (!Cache.empty()) {
629 return Cache;
634 for (NonLocalDepInfo::iterator I = Cache.begin(), E = Cache.end();
640 std::sort(Cache.begin(), Cache.end());
644 // << Cache.size() << " cached: " << *QueryInst;
658 unsigned NumSortedEntries = Cache.size();
659 DEBUG(AssertSorted(Cache));
672 DEBUG(AssertSorted(Cache, NumSortedEntries));
674 std::upper_bound(Cache.begin(), Cache.begin()+NumSortedEntries,
676 if (Entry != Cache.begin() && prior(Entry)->getBB() == DirtyBB)
680 if (Entry != Cache.begin()+NumSortedEntries &&
721 Cache.push_back(NonLocalDepEntry(DirtyBB, Dep));
739 return Cache;
774 /// Pointer/PointeeSize using either cached information in Cache or by doing a
780 NonLocalDepInfo *Cache, unsigned NumSortedEntries) {
785 std::upper_bound(Cache->begin(), Cache->begin()+NumSortedEntries,
787 if (Entry != Cache->begin() && (Entry-1)->getBB() == BB)
791 if (Entry != Cache->begin()+NumSortedEntries && Entry->getBB() == BB)
811 // Eliminating the dirty entry from 'Cache', so update the reverse info.
826 Cache->push_back(NonLocalDepEntry(BB, Dep));
830 // to Cache!
847 SortNonLocalDepInfoCache(MemoryDependenceAnalysis::NonLocalDepInfo &Cache,
849 switch (Cache.size() - NumSortedEntries) {
855 NonLocalDepEntry Val = Cache.back();
856 Cache.pop_back();
858 std::upper_bound(Cache.begin(), Cache.end()-1, Val);
859 Cache.insert(Entry, Val);
864 if (Cache.size() != 1) {
865 NonLocalDepEntry Val = Cache.back();
866 Cache.pop_back();
868 std::upper_bound(Cache.begin(), Cache.end(), Val);
869 Cache.insert(Entry, Val);
874 std::sort(Cache.begin(), Cache.end());
958 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps;
969 for (NonLocalDepInfo::iterator I = Cache->begin(), E = Cache->end();
983 for (NonLocalDepInfo::iterator I = Cache->begin(), E = Cache->end();
997 if (Cache->empty())
1013 unsigned NumSortedEntries = Cache->size();
1014 DEBUG(AssertSorted(*Cache));
1027 DEBUG(AssertSorted(*Cache, NumSortedEntries));
1028 MemDepResult Dep = GetNonLocalInfoForBlock(Loc, isLoad, BB, Cache,
1080 if (Cache && NumSortedEntries != Cache->size()) {
1081 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1082 NumSortedEntries = Cache->size();
1084 Cache = 0;
1174 // Refresh the CacheInfo/Cache pointer so that it isn't invalidated.
1176 Cache = &CacheInfo->NonLocalDeps;
1177 NumSortedEntries = Cache->size();
1179 // Since we did phi translation, the "Cache" set won't contain all of the
1192 if (Cache == 0) {
1193 // Refresh the CacheInfo/Cache pointer if it got invalidated.
1195 Cache = &CacheInfo->NonLocalDeps;
1196 NumSortedEntries = Cache->size();
1199 // Since we failed phi translation, the "Cache" set won't contain all of the
1213 for (NonLocalDepInfo::reverse_iterator I = Cache->rbegin(); ; ++I) {
1214 assert(I != Cache->rend() && "Didn't find current block??");
1228 SortNonLocalDepInfoCache(*Cache, NumSortedEntries);
1229 DEBUG(AssertSorted(*Cache));
1250 // Eliminating the dirty entry from 'Cache', so update the reverse info.