yaxunl added a comment. In D55067#1313364 <https://reviews.llvm.org/D55067#1313364>, @arsenm wrote:
> In D55067#1313264 <https://reviews.llvm.org/D55067#1313264>, @yaxunl wrote: > > > In D55067#1313213 <https://reviews.llvm.org/D55067#1313213>, @rjmccall > > wrote: > > > > > This seems backwards. Clang knows what the actual ABI alignment of the C > > > type is, and it doesn't have to match the alignment of the IR type that > > > IRGen produces. It's the actual C ABI alignment that's supposed to > > > affect the calling convention, so there needs to be some way to specify > > > the C ABI alignment on the parameter in IR. That may mean using `byval`, > > > which can be given an explicit alignment. > > > > > > AMDGPU backend does not support passing struct type kernel argument by > > pointer with byval attribute. > > > > @arsenm Do you think it is feasible to use pointer with byval attribute to > > pass the struct type kernel argument? Thanks. > > > byval really doesn't make any sense for kernels. The address space wouldn't > even match correctly, since byval is for stack passed arguments How about clang emits kernel argument alignment metadata for C ABI and backend follows that? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55067/new/ https://reviews.llvm.org/D55067 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits