[llvm] [TTI][AMDGPU] Allow targets to adjust `LastCallToStaticBonus` via `getInliningLastCallToStaticBonus` (PR #111311)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 00:35:36 PDT 2024


================
@@ -75,6 +75,10 @@ static cl::opt<size_t> InlineMaxBB(
     cl::desc("Maximum number of BBs allowed in a function after inlining"
              " (compile time constraint)"));
 
+static cl::opt<unsigned> InlineLastCallToStaticBonus(
+    "amdgpu-inline-last-call-to-static-bonus", cl::Hidden, cl::init(165000),
----------------
jmmartinez wrote:

What do you think about keeping it as a constant and not an option?

I don't think nobody is ever going to use that option.

And in your test the bonus contribution is already clear by comparing the scores for `@callee_not_only_one_live_use` and `@callee_only_one_live_use`.

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


More information about the llvm-commits mailing list