[all-commits] [llvm/llvm-project] c2376e: [AMDGPU] Increase inline threshold when the callee...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Tue Oct 8 12:47:51 PDT 2024
Branch: refs/heads/users/shiltian/inline-threshold-with-only-one-use
Home: https://github.com/llvm/llvm-project
Commit: c2376efb90bf38376c362e012e2d1ee77234d5e5
https://github.com/llvm/llvm-project/commit/c2376efb90bf38376c362e012e2d1ee77234d5e5
Author: Shilei Tian <shilei.tian at amd.com>
Date: 2024-10-08 (Tue, 08 Oct 2024)
Changed paths:
M llvm/include/llvm/Analysis/TargetTransformInfo.h
M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
M llvm/lib/Analysis/InlineCost.cpp
M llvm/lib/Analysis/TargetTransformInfo.cpp
M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
A llvm/test/Transforms/Inline/AMDGPU/amdgpu-inline-only-one-live-use.ll
Log Message:
-----------
[AMDGPU] Increase inline threshold when the callee only has one live use
Currently we will not inline a large function even if it only has one live use.
This could significantly impact the performance because CSR spill is very
expensive. The goal of this PR is trying to force the inlining if there is only
one live use by adjusting the inlining threshold, which is a configurable
number. The default value is 15000, which borrows from
`InlineConstants::LastCallToStaticBonus`. I'm not sure if this is a good number,
and if this is the right way to do that. After making this change, the callee in
my local test case can finally be inlined, but the cost is still very close to
the threshold: `cost=14010, threshold=170775`.
Speaking of the test, how are we gonna test this? Do we want to include a giant
IR file?
Fixes SWDEV-471398.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list