Skip to content

Commit

Permalink
Declare and use TableGen class DXILAttribute instead of class Pred
Browse files Browse the repository at this point in the history
to define DXIL attributes
  • Loading branch information
bharadwajy committed Jul 15, 2024
1 parent 3a19009 commit 05669d4
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions llvm/lib/Target/DirectX/DXIL.td
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,6 @@ class Pred;
// Following classes represent predicate that evaluate to the payload,
// if one xists, unconditionally.

// DXIL Op attributes defined as true predicates, if specified

def ReadOnly : Pred;
def ReadNone : Pred;
def IsDerivative : Pred;
def IsGradient : Pred;
def IsFeedback : Pred;
def IsWave : Pred;
def NeedsUniformInputs : Pred;
def IsBarrier : Pred;

// Predicate that evaluates to specified shader model version unconditionally.
class SMVersion<Version ver> : Pred {
Version sm_version = ver;
Expand All @@ -282,6 +271,20 @@ class Constraints<Pred p, list<Pred> l = []> : Pred {
list<Pred> constraints = l;
}

// DXIL Op attributes defined as true predicates, if specified

class DXILAttribute;

def ReadOnly : DXILAttribute;
def ReadNone : DXILAttribute;
def IsDerivative : DXILAttribute;
def IsGradient : DXILAttribute;
def IsFeedback : DXILAttribute;
def IsWave : DXILAttribute;
def NeedsUniformInputs : DXILAttribute;
def IsBarrier : DXILAttribute;


// Marker used to identify attribute list.
def attrs;

Expand Down Expand Up @@ -317,7 +320,7 @@ class DXILOp {
list<Constraints> constraints = [];

// Operation attributes
list<Pred> attributes = [];
list<DXILAttribute> attributes = [];

Version DXILVersion = ? ;
}
Expand Down

0 comments on commit 05669d4

Please sign in to comment.