mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-12 11:03:24 +00:00

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
25 lines
636 B
C++
25 lines
636 B
C++
#include "AMDGPUMachineFunction.h"
|
|
#include "AMDGPU.h"
|
|
#include "Utils/AMDGPUBaseInfo.h"
|
|
#include "llvm/IR/Attributes.h"
|
|
#include "llvm/IR/Function.h"
|
|
using namespace llvm;
|
|
|
|
// Pin the vtable to this file.
|
|
void AMDGPUMachineFunction::anchor() {}
|
|
|
|
AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
|
|
MachineFunctionInfo(),
|
|
LDSSize(0),
|
|
ABIArgOffset(0),
|
|
ScratchSize(0),
|
|
IsKernel(MF.getFunction()->getCallingConv() == llvm::CallingConv::AMDGPU_KERNEL ||
|
|
MF.getFunction()->getCallingConv() == llvm::CallingConv::SPIR_KERNEL)
|
|
{
|
|
}
|
|
|
|
bool AMDGPUMachineFunction::isKernel() const
|
|
{
|
|
return IsKernel;
|
|
}
|