[llvm] [GVN/MemDep] Limit the size of the cache for non-local dependencies. (PR #150539)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 23 13:20:36 PDT 2025


================
@@ -1142,6 +1146,11 @@ bool MemoryDependenceResults::getNonLocalPointerDepFromBB(
     return true;
   }
 
+  // If the size of this cache has surpassed the global limit, stop here.
+  if (Cache->size() > CacheGlobalLimit) {
+    return false;
+  }
----------------
nikic wrote:

braces

https://github.com/llvm/llvm-project/pull/150539


More information about the llvm-commits mailing list