[PATCH] D155986: [clang][AMDGPU]: Don't use byval for struct arguments in function ABI

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 15:32:47 PDT 2023


arsenm added a comment.

In D155986#4524001 <https://reviews.llvm.org/D155986#4524001>, @jdoerfert wrote:

> 1. This is dangerous since we change something that is tested. Interoperability might not be the biggest thing yet, but special casing clangs behavior seems a slippery slope towards rust/fortran/Julia/... code not being able to talk to C/C++/HIP/... code when both are compiled for AMDGPUs.

It's not special casing clang's behavior. We are defining the C ABI, a thing which currently does not exist. Other languages that want to be compatible with the C ABI have to follow, but they don't have to. This isn't a unique property, and every frontend has to do this for every target.  I don't see why we need to carry the albatross of byval simply because llvm didn't well abstract ABI details.


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

https://reviews.llvm.org/D155986



More information about the llvm-commits mailing list