[all-commits] [llvm/llvm-project] 50b694: [Clang][AMDGPU] Avoid Using `byval` for `ndrange_t...

Shilei Tian via All-commits all-commits at lists.llvm.org
Fri Nov 15 12:36:07 PST 2024


  Branch: refs/heads/users/shiltian/no-byval-amdgpu
  Home:   https://github.com/llvm/llvm-project
  Commit: 50b6941f3ee43f5c4e559112fbb3fd8fa9fb6016
      https://github.com/llvm/llvm-project/commit/50b6941f3ee43f5c4e559112fbb3fd8fa9fb6016
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2024-11-15 (Fri, 15 Nov 2024)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl
    M clang/test/CodeGenOpenCL/cl20-device-side-enqueue-attributes.cl
    M clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl

  Log Message:
  -----------
  [Clang][AMDGPU] Avoid Using `byval` for `ndrange_t` when emitting `__enqueue_kernel_basic`

AMDGPU disabled the use of `byval` for struct argument passing in commit
d77c620. However, when emitting `__enqueue_kernel_basic`, Clang still adds the
`byval` attribute by default. This PR introduces a target check to avoid
emitting the `byval` attribute unnecessarily.

FWIW, I’m not sure if it’s a good idea to emit the `byval` attribute by default
in this context. The way arguments are passed is highly target-dependent, and
making assumptions here doesn’t seem ideal.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list