[clang] [llvm] [AMDGPU] Add per-kernel kernarg preload count (PR #211059)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 22 19:55:48 PDT 2026


yxsamliu wrote:

@arsenm Re: preload count

I used a count because it matches what the backend can control today. The backend only supports preloading a contiguous prefix of the kernarg segment. It cannot select arbitrary arguments yet.

There may be cases where a kernel wants to limit the SGPRs used for preload, to leave SGPRs for other uses. That may be rare though.

If the count control is not useful enough, I can change this to a simpler on/off attribute: either disable preload for the kernel, or let the backend preload up to the normal maximum. Selecting specific arguments would need separate backend/IR work. The existing related PRs also do not seem to provide that functionality.

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


More information about the cfe-commits mailing list