]> granicus.if.org Git - clang/commit
[CUDA] Set LLVM calling convention for CUDA kernel
authorYaxun Liu <Yaxun.Liu@amd.com>
Fri, 20 Apr 2018 17:01:03 +0000 (17:01 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Fri, 20 Apr 2018 17:01:03 +0000 (17:01 +0000)
commit5e06777f412ad04e9c33c701de2f8157720c3590
treecc59bdb0b4bce16d447fdd889cf07d64bca241a5
parent2889dbd84158f6ec5b705a327162a48a65bf6147
[CUDA] Set LLVM calling convention for CUDA kernel

Some targets need special LLVM calling convention for CUDA kernel.
This patch does that through a TargetCodeGenInfo hook.

It only affects amdgcn target.

Patch by Greg Rodgers.
Revised and lit tests added by Yaxun Liu.

Differential Revision: https://reviews.llvm.org/D45223

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@330447 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/TargetInfo.cpp
lib/CodeGen/TargetInfo.h
test/CodeGenCUDA/kernel-amdgcn.cu [new file with mode: 0644]