[PATCH] D43736: [AMDGPU] Remove use of OpenCL triple environment and replace with function attribute for AMDGPU

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 21:35:37 PST 2018


t-tye added a subscriber: scchan.
t-tye added inline comments.


================
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);
   }
----------------
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.


https://reviews.llvm.org/D43736





More information about the llvm-commits mailing list