[llvm-branch-commits] [llvm] 9c8451e - Revert "[FuncSpec] Relax restrictions on code size growth (#196570)"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Nov 5 02:20:59 PST 2026
Author: Momchil Velikov
Date: 2026-11-05T10:20:53Z
New Revision: 9c8451eb483c9875fa83b6e815a104d7d43a7039
URL: https://github.com/llvm/llvm-project/commit/9c8451eb483c9875fa83b6e815a104d7d43a7039
DIFF: https://github.com/llvm/llvm-project/commit/9c8451eb483c9875fa83b6e815a104d7d43a7039.diff
LOG: Revert "[FuncSpec] Relax restrictions on code size growth (#196570)"
This reverts commit 63869fbf169963adb7c737bc3e6be2fe86531253.
Added:
Modified:
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/test/Transforms/FunctionSpecialization/recursive-penalty.ll
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
index 075eb21324237c..038b2081e61c4c 100644
--- a/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
@@ -62,9 +62,9 @@ static cl::opt<unsigned> MinFunctionSize(
cl::desc("Don't specialize functions that have less than this number of "
"instructions"));
-static cl::opt<unsigned>
- MaxCodeSizeGrowth("funcspec-max-codesize-growth", cl::init(4), cl::Hidden,
- cl::desc("Maximum codesize growth allowed per function"));
+static cl::opt<unsigned> MaxCodeSizeGrowth(
+ "funcspec-max-codesize-growth", cl::init(3), cl::Hidden, cl::desc(
+ "Maximum codesize growth allowed per function"));
static cl::opt<unsigned> MinCodeSizeSavings(
"funcspec-min-codesize-savings", cl::init(20), cl::Hidden,
diff --git a/llvm/test/Transforms/FunctionSpecialization/recursive-penalty.ll b/llvm/test/Transforms/FunctionSpecialization/recursive-penalty.ll
index 03eb8df046e5d5..fc17387dec94dd 100644
--- a/llvm/test/Transforms/FunctionSpecialization/recursive-penalty.ll
+++ b/llvm/test/Transforms/FunctionSpecialization/recursive-penalty.ll
@@ -6,7 +6,7 @@
; Make sure the number of specializations created are not
; linear to the number of iterations (funcspec-max-iters).
-; CHECK: FnSpecialization: Created 6 specializations in module
+; CHECK: FnSpecialization: Created 4 specializations in module
@Global = internal constant i32 1, align 4
More information about the llvm-branch-commits
mailing list