[PATCH] D15424: AMDGPU/SI: Add getShaderType() function to Utils/

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 10:49:20 PST 2015


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:103
@@ -101,1 +102,3 @@
 
+static const char *const ShaderTypeAttribute = "ShaderType";
+
----------------
I usually prefer to define short strings like this as an array rather than the pointer

================
Comment at: lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:112
@@ +111,3 @@
+    if (Str.getAsInteger(0, ShaderType))
+      llvm_unreachable("Can't parse shader type!");
+  }
----------------
I think this should either be an emitError or default to compute.


http://reviews.llvm.org/D15424





More information about the llvm-commits mailing list