[llvm] [DXIL] Model DXIL Class and Shader Model association of DXIL Ops in DXIL.td (PR #87803)

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 15:41:32 PDT 2024


================
@@ -13,331 +13,200 @@
 
 include "llvm/IR/Intrinsics.td"
 
-class DXILOpClass;
+// Abstract class to demarcate minimum Shader model version required
+// to support DXIL Op
+class DXILShaderModel<int major, int minor> {
+  int MajorAndMinor = !add(!mul(major, 10), minor);
----------------
bharadwajy wrote:

> Why are we combining the major and minor into a single value at all? This seems confusing and error prone compared to simply having two separate values.

Please refer to a later commit that handled this differently.

https://github.com/llvm/llvm-project/pull/87803


More information about the llvm-commits mailing list