// cache remains sorted. Sort it now (if needed) so that recursive
// invocations of getNonLocalPointerDepFromBB that could reuse the cache
// value will only see properly sorted cache arrays.
- if (Cache && NumSortedEntries != Cache->size()) {
+ if (Cache && NumSortedEntries != Cache->size())
std::sort(Cache->begin(), Cache->end());
- NumSortedEntries = Cache->size();
- Cache = 0;
- }
+ Cache = 0;
// FIXME: it is entirely possible that PHI translating will end up with
// the same value. Consider PHI translating something like:
// Refresh the CacheInfo/Cache pointer so that it isn't invalidated.
CacheInfo = &NonLocalPointerDeps[CacheKey];
Cache = &CacheInfo->second;
-
+ NumSortedEntries = Cache->size();
+
// Since we did phi translation, the "Cache" set won't contain all of the
// results for the query. This is ok (we can still use it to accelerate
// specific block queries) but we can't do the fastpath "return all