[llvm] [CGData][GMF] Skip No Params (PR #116548)

Zhaoxuan Jiang via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 17 22:25:15 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:

I am not sure if we should set the default value slightly higher, maybe like `1.2`? I believe `1.0` is a guaranteed underestimation for AArch64 backend.

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


More information about the llvm-commits mailing list