mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-05-23 07:26:13 +00:00

This was reverted in r268740 because of problems with corresponding Clang change. Clang change was updated and resubmitted in r274220. 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 llvm-svn: 274341
24 lines
561 B
C++
24 lines
561 B
C++
#include "AMDGPUMachineFunction.h"
|
|
|
|
using namespace llvm;
|
|
|
|
// Pin the vtable to this file.
|
|
void AMDGPUMachineFunction::anchor() {}
|
|
|
|
AMDGPUMachineFunction::AMDGPUMachineFunction(const MachineFunction &MF) :
|
|
MachineFunctionInfo(),
|
|
KernArgSize(0),
|
|
MaxKernArgAlign(0),
|
|
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;
|
|
}
|