[PATCH] D16010: AMDGPU: Emit note directive for HSA even if there are no functions

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 17:00:24 PST 2016


tstellarAMD added inline comments.

================
Comment at: lib/Target/AMDGPU/AMDGPUTargetMachine.h:90
@@ +89,3 @@
+    // Ideally this would be property of the TargetMachine.
+    return Subtarget.getIsaVersion();
+  }
----------------
echristo wrote:
> This is pretty gross. Why not just move the variable to the TargetMachine or have a function that's part of the target machine that looks up ISA version based on... whatever it is it's based on? :)
ISA version is based on the CPU string.  The reason to do it this way is the logic mapping CPU strings to IsaVersion already exists in the .TD files and I didn't want to duplicate the logic here, but if implementing it this way is a problem then I can duplicate the logic here, it should be a problem.  Do you have a preference?



http://reviews.llvm.org/D16010





More information about the llvm-commits mailing list