diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -192,6 +192,11 @@ cl::Hidden, cl::ZeroOrMore, cl::desc("Run Partial inlinining pass")); +static cl::opt PreInlineThreshold( + "npm-preinline-threshold", cl::Hidden, cl::init(75), cl::ZeroOrMore, + cl::desc("Control the amount of inlining in pre-instrumentation inliner " + "(default = 75)")); + static cl::opt RunNewGVN("enable-npm-newgvn", cl::init(false), cl::Hidden, cl::ZeroOrMore, @@ -575,8 +580,7 @@ if (!isOptimizingForSize(Level) && !IsCS) { InlineParams IP; - // In the old pass manager, this is a cl::opt. Should still this be one? - IP.DefaultThreshold = 75; + IP.DefaultThreshold = PreInlineThreshold; // FIXME: The hint threshold has the same value used by the regular inliner. // This should probably be lowered after performance testing.