mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user