[llvm] [FuncSpec] Improve accounting of specialization codesize growth (PR #113448)

Alexandros Lamprineas via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 03:05:46 PDT 2024


================
@@ -964,7 +970,7 @@ bool FunctionSpecializer::findSpecializations(Function *F, unsigned FuncSize,
         if (LatencySavings < MinLatencySavings * FuncSize / 100)
           return false;
         // Maximum codesize growth.
-        if (FunctionGrowth[F] / FuncSize > MaxCodeSizeGrowth)
+        if ((FunctionGrowth[F] + CodeSizeCost) / FuncSize > MaxCodeSizeGrowth)
----------------
labrinea wrote:

s/CodeSizeCost/SpecSize

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


More information about the llvm-commits mailing list