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

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 01:10:57 PDT 2025


================
@@ -793,7 +801,7 @@ static void computeKnownBitsFromCond(const Value *V, Value *Cond,
                                      KnownBits &Known, unsigned Depth,
                                      const SimplifyQuery &SQ, bool Invert) {
   Value *A, *B;
-  if (Depth < MaxAnalysisRecursionDepth &&
+  if (Depth < getAnalysisRecursionDepthLimit() &&
----------------
cdevadas wrote:

Avoid calling this helper function multiple times inside a function. Compute it once and then reuse the result. This PR contains many such instances.

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


More information about the llvm-commits mailing list