[PATCH] D125970: [amdgpu] Add amdgpu_kernel calling conv attribute to clang

Jon Chesterfield via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 19 14:06:29 PDT 2022


JonChesterfield added a comment.

Added a codegen test for arg passing. It establishes that most arguments are left alone, but structs passed by value are handled as an addrspace(4) byref. Letting opt -O2 run annotated some argument pointers as being in addrspace(1) which I think is wrong.

I have no judgement to pass on the current codegen for this - it might be correct, or we might have bugs in opt - but those bugs are exactly those that are easier to flush out if we land this patch first. All I want to achieve with this patch is a means of tagging a void func(void) with the calling convention.

If we wanted to go further - and turn C++ into a language that is robustly usable on the GPU - I think we have a bunch of tasks related to handling addrspace annotations to burn through.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125970/new/

https://reviews.llvm.org/D125970



More information about the cfe-commits mailing list