[all-commits] [llvm/llvm-project] 2d520d: [AMDGPU] Increase inline threshold when the callee...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Fri Oct 11 07:19:20 PDT 2024
Branch: refs/heads/users/shiltian/inline-threshold-with-only-one-use
Home: https://github.com/llvm/llvm-project
Commit: 2d520d93a5b7b098d1854b11044c151163329011
https://github.com/llvm/llvm-project/commit/2d520d93a5b7b098d1854b11044c151163329011
Author: Shilei Tian <shilei.tian at amd.com>
Date: 2024-10-11 (Fri, 11 Oct 2024)
Changed paths:
M llvm/include/llvm/Analysis/InlineAdvisor.h
M llvm/include/llvm/Analysis/InlineCost.h
M llvm/include/llvm/Analysis/TargetTransformInfo.h
M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
M llvm/lib/Analysis/InlineAdvisor.cpp
M llvm/lib/Analysis/InlineCost.cpp
M llvm/lib/Analysis/TargetTransformInfo.cpp
M llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.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