[PATCH] D43736: [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 20 12:37:46 PDT 2018
arsenm requested changes to this revision.
arsenm added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Target/AMDGPU/AMDGPUSubtarget.h:540-541
return 16;
- if (isAmdHsaOS() && isOpenCLEnv())
- return 32;
- return 0;
+ return AMDGPU::getIntegerAttribute(
+ MF.getFunction(), "amdgpu-implicitarg-num-bytes", 0);
}
----------------
t-tye wrote:
> arsenm wrote:
> > Is there a maximum value we could default this to instead of 0? I'm a bit worried that if this attribute is missing or mis-specified the program will be broken, i.e. this attribute could only reduce the amount used
> I spoke to @scchan and HCC does not use any implicit arguments, so defaulting to 0 seems the right thing.
I don't see how what hcc wants is related? What is the maximum value this could be? In general attributes should make things less conservative, not more
https://reviews.llvm.org/D43736
More information about the llvm-commits
mailing list