[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
Fri Apr 5 11:35:52 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:

> Do we have precedent for this? What would happen if we have SM 6.10 and SM 7.0 with this scheme?

Good point. I do not know of a precedent - but can change the computation to `!add(!mul(major, 100), minor)` to take that into consideration.

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


More information about the llvm-commits mailing list