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

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 17 23:21:21 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);
----------------
kyulee-com wrote:

I don't mind changing the default value as it could eventually change depending on target/app. In theory, it's hard to precisely estimate final size impact for the given IR, anyhow,

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


More information about the llvm-commits mailing list