[clang] [Clang][OpenCL][AMDGPU] Use `byref` for OpenCL kernel arguments (PR #134892)

Shilei Tian via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 21:57:27 PDT 2025


shiltian wrote:

> The question isn't byval or byref, we already don't use byval. The important ABI piece is the alignment of a pointer value passed indirectly.
> 
> We lose all parameter attributes by going through indirect passing, but some of those can be recovered by putting the metadata on the load.

I might misunderstand it but based on your comment, it doesn't sound like the issue is with using `byref` for aggregate arguments in OpenCL, especially since OpenCL is currently the only language not using it. We already use it for HIP.

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


More information about the cfe-commits mailing list