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

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 11:48:32 PDT 2023


cfang created this revision.
cfang added reviewers: arsenm, bcahoon.
Herald added subscribers: kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
cfang requested review of this revision.
Herald added a subscriber: wdng.

Byval requires allocating additional stack space, and always requires an implicit copy to be inserted in codegen,
where it can be difficult to optimize.  In this work, we use byref/IndirectAliased promotion method instead of
byval with the implicit copy semantics.


https://reviews.llvm.org/D155986

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/Targets/AMDGPU.cpp
  clang/test/CodeGenCXX/amdgcn-func-arg.cpp
  clang/test/CodeGenOpenCL/addr-space-struct-arg.cl
  clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
  clang/test/CodeGenOpenCL/byval.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155986.543015.patch
Type: text/x-patch
Size: 17415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230721/9ca8004c/attachment.bin>


More information about the llvm-commits mailing list