[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 18 08:29:32 PST 2025


================
@@ -483,6 +483,14 @@ ANALYZER_OPTION(
     "behavior, set the option to 0.",
     5)
 
+ANALYZER_OPTION(
+    unsigned, RegionStoreMaxBindingFanOut, "region-store-max-binding-fanout",
+    "This option limits how many sub-bindings a single binding operation can "
+    "scatter into. For example, binding an array would scatter into binding "
+    "each individual element. Setting this to zero means unlimited, but then "
+    "modelling large array initializers may take proportional time to their "
+    "size.", 100)
----------------
NagyDonat wrote:

The loop unrolling code introduces
```cpp
static const int MAXIMUM_STEP_UNROLLED = 128;
```
so perhaps this should be also defaulted to 128 instead of 100?  (Both are acceptable round values, but I feel that it's a bit better if we're consistent.)

(This is a low priority idea, I'm also OK with the current default value.)

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


More information about the cfe-commits mailing list