[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 6 08:44:30 PST 2018


arsenm 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);
   }
----------------
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


https://reviews.llvm.org/D43736





More information about the llvm-commits mailing list