[llvm] [AMDGPU] Support preloading hidden kernel arguments (PR #98861)
Austin Kerbow via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 28 22:08:28 PDT 2024
================
@@ -2518,6 +2519,19 @@ void SITargetLowering::allocatePreloadKernArgSGPRs(
unsigned NumAllocSGPRs =
alignTo(ArgLoc.getLocVT().getFixedSizeInBits(), 32) / 32;
+ if (!AlignedForImplictArgs && Arg.getName().starts_with("_hidden")) {
----------------
kerbowa wrote:
This is lowering both explicit and implicit arguments now, but only the ones marked with inreg. The check here is if extra padding SGPRs are needed when the implicitargs start. The firmware copies the data to SGPRs directly from the kernarg segment. With the alignment of the kernarg segment we may need to allocate an empty SGPR. We would not like to allocate it this way but need to understand that the HW is and we don't really have a choice which SGPR gets which data.
https://github.com/llvm/llvm-project/pull/98861
More information about the llvm-commits
mailing list