[PATCH] D69679: [AMDGPU] Add amdgpu-promote-pointer-kernargs pass

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 31 14:34:15 PDT 2019


arsenm added a comment.

In D69679#1729328 <https://reviews.llvm.org/D69679#1729328>, @yaxunl wrote:

> In D69679#1729204 <https://reviews.llvm.org/D69679#1729204>, @arsenm wrote:
>
> > Clang should just be directly emitting the arguments with the global address space in the first place. It already has support for coercing argument types per calling convention and this is no different
>
>
> In CUDA/HIP language all pointer type kernel args are in default address space, so it is reasonable to emit them as pointers in default address space in IR. Translating them to global address space in clang codegen is not necessary and is better done in backend, as what is done in NVPTX
>
> https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp#L30
>
> Add @tra @rjmccall for comments about where should this be implemented.


The language address space doesn't need to match the calling convention argument type. You can coerce them to global for codegen purposes


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69679





More information about the llvm-commits mailing list