[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
Mon Feb 26 08:24:09 PST 2018

arsenm added inline comments.

Comment at: include/llvm/ADT/Triple.h:205
-    AMDOpenCL,
This isn't related to this. This was used in the x86 OpenCL implementation to change some lib calls I believe

Comment at: lib/Target/AMDGPU/AMDGPUSubtarget.h:214-217
-  bool isOpenCLEnv() const {
-    return TargetTriple.getEnvironment() == Triple::OpenCL ||
-           TargetTriple.getEnvironmentName() == "amdgizcl";
+  bool isOpenCLLanguage(const MachineFunction &MF) const {
+    return MF.getFunction().hasFnAttribute("amdgpu-opencl");
The naming of this is wrong. We don't want to specify the language, I thought the point of this was to specify the size of the kernel segment, so this would have a value and not be a bool indicating a source language


More information about the llvm-commits mailing list