[hip] Remove the coercion on aggregate kernel arguments.
authorMichael Liao <michael.hliao@gmail.com>
Tue, 10 Nov 2020 14:34:14 +0000 (09:34 -0500)
committerMichael Liao <michael.hliao@gmail.com>
Fri, 13 Nov 2020 02:19:30 +0000 (21:19 -0500)
commit8920ef06a138c46b208fb6471d500261c4b9bacc
tree56a7021f7591c573b4d52837b39768212a71928c
parent243511a24e5ac134d88178b036d52f151da260ac
[hip] Remove the coercion on aggregate kernel arguments.

- If an aggregate argument is indirectly accessed within kernels, direct
  passing results in unpromotable `alloca`, which degrade performance
  significantly. InferAddrSpace pass is enhanced in
  [D91121](https://reviews.llvm.org/D91121) to take the assumption that
  generic pointers loaded from the constant memory could be regarded
  global ones. The need for the coercion on aggregate arguments is
  mitigated.

Differential Revision: https://reviews.llvm.org/D89980
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu
clang/test/CodeGenCUDA/kernel-args.cu