[llvm] [AMDGPU] Lower `llvm.amdgcn.queue.ptr` instrinsic to using implicit kernel argument if feasible (PR #103490)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 14 09:44:32 PDT 2024
shiltian wrote:
That is an indirect way doing that.
What this patch is doing can allow us not to set `.hidden_queue_ptr` unnecessarily. Currently we set it when the function attribute `amdgpu-no-queue-ptr` is absent even for GFX9+ with COV5+. Since we already handle the use of queue pointer for aperture base and trap handling correctly based on COV, it is supposed to safely not set it. However, we still do it. That is probably based on the assumption that a function can call the intrinsic, since we lower it to read the SGPR in any case. If we can lower it to implicit kernel argument for COV5+, we can safely drop `.hidden_queue_ptr` for COV5+.
https://github.com/llvm/llvm-project/pull/103490
More information about the llvm-commits
mailing list