[clang] [llvm] [clang][Inliner] Add opt-in inliner hints for lambdas and main-file functions (PR #228074)

Nathan Corbyn via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 06:43:56 PDT 2026


================
@@ -2194,6 +2228,23 @@ void InlineCostCallAnalyzer::updateThreshold(CallBase &Call, Function &Callee) {
   SingleBBBonus = Threshold * SingleBBBonusPercent / 100;
   VectorBonus = Threshold * VectorBonusPercent / 100;
 
+  // A lambda is usually specific to its call sites, very often there's only
+  // one call site, and inlining is especially benefitial: Captured variables
----------------
cofibrant wrote:

Typo `beneficial`

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


More information about the llvm-commits mailing list