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

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 14:08:19 PDT 2024


================
@@ -74,6 +74,10 @@ class TargetTransformInfoImplBase {
   unsigned getInliningCostBenefitAnalysisProfitableMultiplier() const {
     return 8;
   }
+  int getInliningLastCallToStaticBonus() const {
+    // This is same as InlineConstants::LastCallToStaticBonus.
+    return 15000;
----------------
shiltian wrote:

I don't want to include `llvm/Analysis/InlineCost.h` here because here it is a header as well, but apparently forward declaration doesn't work because the `InlineConstants::LastCallToStaticBonus` defined in a header as well. Any suggestions?

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


More information about the llvm-commits mailing list