[llvm] [DXIL][Doc] Update specification of to use TableGen list instead of dag (PR #99055)

Damyan Pepper via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 12:06:10 PDT 2024


================
@@ -172,112 +177,272 @@ Shader Model version is represented as follows:
      int Minor = minor;
    }
 
-   // Valid Shader model version records
 
-   // Definition of Shader Model 6.0 - 6.8 and DXIL Version 1.0 - 1.8
+Concrete representations of valid DXIL versions are defined as follows:
+
+.. code-block::
+
+   // Definition of DXIL Version 1.0 - 1.8
    foreach i = 0...8 in {
-     def SM6_#i : Version<6, i>;
-     def DX1_#i : Version<1, i>;
+     def DXIL1_#i : Version<1, i>;
    }
 
-A shader model version predicate class is defined as
+Shader Stage Specification
+==========================
+
+Various shader stages such as ``compute``, ``pixel``, ``vertex``, etc., are represented
+as follows
 
 .. code-block::
 
-   class SMVersion<Version ver> : Pred {
-     Version SMVersion = ver;
-   }
+   // Shader stages
+   class DXILShaderStage;
 
-A constraint class to represent overload types and shader stages predicated on shader
-model version is defined as
+   def compute : DXILShaderStage;
+   def pixel : DXILShaderStage;
+   def vertex : DXILShaderStage;
+   ...
+
+Shader Attribute Specification
+==============================
+
+Various operation memory access and boolean attributes such as ``ReadNone``,
+``IsWave`` etc., are represented as follows
 
 .. code-block::
 
-   class SMVersionConstraints<SMVersion smver, dag oloads, dag stages> : Constraint<smver> {
-     dag overload_types = oloads;
-     dag stage_kinds = stages;
-   }
+  class DXILAttribute;
 
-The ``dag overload_types`` and ``dag shader_kinds`` use a special markers ``overloads``
-and ``stages``, respectively.
+  def ReadOnly : DXILOpAttributes;
+  def ReadNone : DXILOpAttributes;
+  def IsWave : DXILOpAttributes;
+  ...
 
-Examples of Constraints
------------------------
+Constrained Specification
----------------
damyanp wrote:

I'm not sure it is correct to continue to refer to these as "constraints".  The various overloads/stage/attributes just specify what's supported.

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


More information about the llvm-commits mailing list