[llvm] [ObjectSizeOffsetVisitor] Add a max recursion depth (PR #67479)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 26 13:10:32 PDT 2023
================
@@ -50,6 +51,12 @@ using namespace llvm;
#define DEBUG_TYPE "memory-builtins"
+static cl::opt<unsigned> ObjectSizeOffsetVisitorMaxRecurseDepth(
+ "object-size-offset-visitor-max-recurse-depth",
+ cl::desc(
+ "Maximum number of PHIs for ObjectSizeOffsetVisitor to look through"),
+ cl::init(100));
----------------
nikic wrote:
I think this should either not be a depth (but total visited count) or be a lot smaller. Recursing 100 levels allows for a *lot* of fan-out. Especially as this is only counting the phis and not other instructions.
https://github.com/llvm/llvm-project/pull/67479
More information about the llvm-commits
mailing list