[clang] [analyzer] Workaround for unintended slowdown (scope increase) (PR #136720)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 24 08:24:29 PDT 2025


================
@@ -414,6 +414,20 @@ ANALYZER_OPTION(
     "any target.",
     true)
 
+ANALYZER_OPTION(
+    bool, LegacyInliningPrevention, "legacy-inlining-prevention",
+    "If enabled, the analyzer puts functions on a \"do not inline this\" list "
+    "if it finds an execution path within that function that may potentially "
+    "perform 'analyzer-max-loop' (= 4 by default) iterations in a loop. "
+    "Note that functions that _definitely_ reach the loop limit on some "
+    "execution path are currently marked as \"do not inline\" even if this "
+    "option is disabled (but this may change in future versions). This option "
+    "is a dumb and arbitrary restriction on inlining, but disabling it would "
----------------
Xazax-hun wrote:

Nit: I'd remove "dumb" from the user facing string. 

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


More information about the cfe-commits mailing list