[llvm] [CGData][GMF] Skip No Params (PR #116548)
Zhaoxuan Jiang via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 17 22:25:14 PST 2024
================
@@ -35,21 +36,30 @@ static cl::opt<unsigned> GlobalMergingMaxParams(
cl::desc(
"The maximum number of parameters allowed when merging functions."),
cl::init(std::numeric_limits<unsigned>::max()), cl::Hidden);
-static cl::opt<unsigned> GlobalMergingParamOverhead(
+static cl::opt<bool> GlobalMergingSkipNoParams(
+ "global-merging-skip-no-params",
+ cl::desc("Skip merging functions with no parameters."), cl::init(false),
+ cl::Hidden);
+static cl::opt<double> GlobalMergingInstOverhead(
+ "global-merging-inst-overhead",
+ cl::desc("The overhead cost associated with each instruction when lowering "
+ "to machine instruction."),
+ cl::init(1.0), cl::Hidden);
----------------
nocchijiang wrote:
Just did a test with `1.2` and it delivered another 0.6% code size reduction on the same project I tested the effect of accurate `ParamCount`.
https://github.com/llvm/llvm-project/pull/116548
More information about the llvm-commits
mailing list