[llvm] [ValueTracking] Make the MaxAnalysisRecursionDepth overridable (PR #137721)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 21:54:10 PDT 2025


================
@@ -927,7 +938,7 @@ void llvm::computeKnownBitsFromContext(const Value *V, KnownBits &Known,
     }
 
     // The remaining tests are all recursive, so bail out if we hit the limit.
-    if (Depth == MaxAnalysisRecursionDepth)
+    if (Depth == DepthLimit::getMaxRecursionDepth())
----------------
arsenm wrote:

I thought this used to start at the max depth and counted down to 0. Can you do that and avoid needing to track some global configuration? 

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


More information about the llvm-commits mailing list