[OpenCL] Mark kernel arguments as ABI aligned
authorNikita Popov <npopov@redhat.com>
Thu, 3 Feb 2022 13:46:57 +0000 (14:46 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 8 Feb 2022 15:12:51 +0000 (16:12 +0100)
commit18834dca2d787fb46532c0b688e396613e132020
tree845c69658f644a45e5aa3db8836b62903391cfc6
parent997027347db7c704d14d5901c828a0f249d30c3f
[OpenCL] Mark kernel arguments as ABI aligned

Following the discussion on D118229, this marks all pointer-typed
kernel arguments as having ABI alignment, per section 6.3.5 of
the OpenCL spec:

> For arguments to a __kernel function declared to be a pointer to
> a data type, the OpenCL compiler can assume that the pointee is
> always appropriately aligned as required by the data type.

Differential Revision: https://reviews.llvm.org/D118894
clang/lib/CodeGen/CGCall.cpp
clang/test/CodeGenOpenCL/amdgpu-call-kernel.cl
clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl
clang/test/CodeGenOpenCL/kernel-param-alignment.cl [new file with mode: 0644]
clang/test/CodeGenOpenCL/kernels-have-spir-cc-by-default.cl
clang/test/CodeGenOpenCL/spir-calling-conv.cl