[PATCH] D151994: [AMDGPU] Add amdgpu_cs_chain[_preserve] CCs to IR & verifier
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 11:26:02 PDT 2023
nhaehnle added inline comments.
================
Comment at: llvm/test/Verifier/amdgpu-cc.ll:217
+; CHECK-NEXT: ptr @inalloca_cc_amdgpu_cs_chain_preserve
+define amdgpu_cs_chain_preserve void @inalloca_cc_amdgpu_cs_chain_preserve(ptr inalloca(i32) %ptr) {
+ ret void
----------------
arsenm wrote:
> Is a regular pointer to the stack allowed?
You mean a `ptr addrspace(5)`? Yes, it's allowed, and we plan to use it.
It's technically not going to be a *stack* pointer as far as LLVM is concerned, because the stack is "dormant"/"inexistent" between chain functions. The plan is to split the wave's scratch allocation into two parts, the bottom part under the control of LLVM and the top part under the control of the frontend, and so passing pointers to that top part can still be meaningful even though the stack "doesn't exist" at chain function boundaries as far as LLVM is concerned.
In principle, we also allow pointers to other address spaces, although I don't see us using those at least for the time being.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151994/new/
https://reviews.llvm.org/D151994
More information about the llvm-commits
mailing list