Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
Show First 20 Lines • Show All 646 Lines • ▼ Show 20 Lines | unsigned AMDGPUSubtarget::getImplicitArgNumBytes(const Function &F) const { | ||||
// used, even if the ABI implies we need them. | // used, even if the ABI implies we need them. | ||||
if (F.hasFnAttribute("amdgpu-no-implicitarg-ptr")) | if (F.hasFnAttribute("amdgpu-no-implicitarg-ptr")) | ||||
return 0; | return 0; | ||||
if (isMesaKernel(F)) | if (isMesaKernel(F)) | ||||
return 16; | return 16; | ||||
// Assume all implicit inputs are used by default | // Assume all implicit inputs are used by default | ||||
return AMDGPU::getIntegerAttribute(F, "amdgpu-implicitarg-num-bytes", 56); | unsigned NBytes = (AMDGPU::getAmdhsaCodeObjectVersion() >= 5) ? 256 : 56; | ||||
return AMDGPU::getIntegerAttribute(F, "amdgpu-implicitarg-num-bytes", NBytes); | |||||
} | } | ||||
uint64_t AMDGPUSubtarget::getExplicitKernArgSize(const Function &F, | uint64_t AMDGPUSubtarget::getExplicitKernArgSize(const Function &F, | ||||
Align &MaxAlign) const { | Align &MaxAlign) const { | ||||
assert(F.getCallingConv() == CallingConv::AMDGPU_KERNEL || | assert(F.getCallingConv() == CallingConv::AMDGPU_KERNEL || | ||||
F.getCallingConv() == CallingConv::SPIR_KERNEL); | F.getCallingConv() == CallingConv::SPIR_KERNEL); | ||||
const DataLayout &DL = F.getParent()->getDataLayout(); | const DataLayout &DL = F.getParent()->getDataLayout(); | ||||
▲ Show 20 Lines • Show All 455 Lines • Show Last 20 Lines |