[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 Aug 11 14:43:26 PDT 2023


arsenm accepted this revision.
arsenm added a comment.
This revision is now accepted and ready to land.

Should look into why noundef was lost, but that can be in a follow up



================
Comment at: clang/lib/CodeGen/Targets/AMDGPU.cpp:252
+
+    // Use pass-by-reference in stead of pass-by-value for struct arguments in
+    // function ABI.
----------------
Typo "in stead"


================
Comment at: clang/test/CodeGenOpenCL/amdgpu-abi-struct-arg-byref.cl:257
 // AMDGCN-LABEL: define dso_local void @FuncLargeTwoMember
-// AMDGCN-SAME: (ptr addrspace(5) noundef byval([[STRUCT_LARGESTRUCTTWOMEMBER:%.*]]) align 8 [[U:%.*]]) #[[ATTR0]] {
+// AMDGCN-SAME: (ptr addrspace(5) byref([[STRUCT_LARGESTRUCTTWOMEMBER:%.*]]) align 8 [[TMP0:%.*]]) #[[ATTR0]] {
 // AMDGCN-NEXT:  entry:
----------------
This lost the noundef, shouldn't lose it


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

https://reviews.llvm.org/D155986



More information about the llvm-commits mailing list