[CUDA][SPIRV] Use OpenCLKernel CC for CUDA -> SPIRV
authorDaniele Castagna <dcastagna@chromium.org>
Mon, 6 Dec 2021 23:06:29 +0000 (15:06 -0800)
committerArtem Belevich <tra@google.com>
Mon, 6 Dec 2021 23:06:57 +0000 (15:06 -0800)
commitabbdc13e6803562bce4e42866a9ebf7f2a04a89b
tree8760208d031085bf5db1d21c8f2e5093fdc4e8c8
parentcc3bb85580189d4a004cfd9bd2d6286cd1c1169f
[CUDA][SPIRV] Use OpenCLKernel CC for CUDA -> SPIRV

Select the OpenCLKernel calling convention for kernels when compiling
CUDA targeting SPIR-V.

In this way the generated LLVM IR will have a spir_kernel calling
convention that will be translated to an OpEntryPoint when converting
to SPIRV.

Reviewed By: jlebar, tra

Differential Revision: https://reviews.llvm.org/D114407
clang/lib/Sema/SemaType.cpp
clang/test/CodeGenCUDASPIRV/kernel-cc.cu [new file with mode: 0644]