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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 07:10:05 PDT 2024


================
@@ -240,6 +240,11 @@ class GCNTTIImpl final : public BasicTTIImplBase<GCNTTIImpl> {
   bool areInlineCompatible(const Function *Caller,
                            const Function *Callee) const;
 
+  int getInliningLastCallToStaticBonus() const {
+    // InlineConstants::LastCallToStaticBonus * 11 where 11 is AMDGPU's inlining
+    // threshold multiplier.
+    return 165000;
----------------
arsenm wrote:

I mean it's preferable to just implement this in terms of what we already have. If the multiplier is already applied to other bonuses, and not this bonus, it's easier and more consistent to just apply it there too. 

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


More information about the llvm-commits mailing list