AMDGPU/SI: Add amdgpu_kernel calling convention. Part 2.

Summary:
    Check calling convention in AMDGPUMachineFunction::isKernel

    This will be used for AMDGPU_HSA_KERNEL symbol type in output ELF.

    Also, in the future unused non-kernels may be optimized.

    Reviewers: tstellarAMD, arsenm

    Subscribers: arsenm, joker.eph, llvm-commits

    Differential Revision: http://reviews.llvm.org/D19917

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nikolay Haustov
2016-05-06 09:23:13 +00:00
parent ac1dd296bc
commit 943961584a
3 changed files with 70 additions and 5 deletions
+8 -1
View File
@@ -13,5 +13,12 @@ AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
LDSSize(0),
ABIArgOffset(0),
ScratchSize(0),
IsKernel(true) {
IsKernel(MF.getFunction()->getCallingConv() == llvm::CallingConv::AMDGPU_KERNEL ||
MF.getFunction()->getCallingConv() == llvm::CallingConv::SPIR_KERNEL)
{
}
bool AMDGPUMachineFunction::isKernel() const
{
return IsKernel;
}