[PATCH] D140242: [AMDGPU] Modify adjustInliningThreshold to also consider the cost of passing function arguments through the stack
Siu Chi Chan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 13:24:02 PST 2022
scchan requested changes to this revision.
scchan added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1204
+ adjustThreshold += std::max(0, SGPRsInUse - 26) * ArgStackInlinePenalty;
+ adjustThreshold += std::max(0, VGPRsInUse - 32) * ArgStackInlinePenalty;
+ return adjustThreshold;
----------------
I guess it's subtracting the number of clobbered registers - instead of a hardcoded value, could that be replaced by something more meaningful like a const variable or a getter?
Also shouldn't VGPRs have a higher penalty relative to SGPRs since they'd occupy more stack space?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140242/new/
https://reviews.llvm.org/D140242
More information about the llvm-commits
mailing list