Skip to content

[DXIL] Remove definition and any uses of DXIL Property #130796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions llvm/lib/Target/DirectX/DXIL.td
Original file line number Diff line number Diff line change
Expand Up @@ -288,17 +288,6 @@ def ReadOnly : DXILAttribute;
def NoDuplicate : DXILAttribute;
def NoReturn : DXILAttribute;

// A property is simply used to mark that a DXIL op belongs to a sub-group of
// DXIL ops, and it is used to query if a particular op holds this property.
// This is used for the static analysis of DXIL ops.
class DXILProperty;

def IsBarrier : DXILProperty;
def IsGradient : DXILProperty;
def IsFeedback : DXILProperty;
def IsWave : DXILProperty;
def RequiresUniformInputs : DXILProperty;

class Overloads<Version ver, list<DXILOpParamType> ols> {
Version dxil_version = ver;
list<DXILOpParamType> overload_types = ols;
Expand Down Expand Up @@ -406,9 +395,6 @@ class DXILOp<int opcode, DXILOpClass opclass> {

// Versioned attributes of operation
list<Attributes> attributes = [];

// List of properties. Default to no properties.
list<DXILProperty> properties = [];
}

// Concrete definitions of DXIL Operations
Expand Down Expand Up @@ -898,7 +884,6 @@ def Barrier : DXILOp<80, barrier> {
let result = VoidTy;
let stages = [Stages<DXIL1_0, [compute, library]>];
let attributes = [Attributes<DXIL1_0, []>];
let properties = [IsBarrier];
}

def Discard : DXILOp<82, discard> {
Expand Down Expand Up @@ -974,7 +959,6 @@ def WaveIsFirstLane : DXILOp<110, waveIsFirstLane> {
let arguments = [];
let result = Int1Ty;
let stages = [Stages<DXIL1_0, [all_stages]>];
let properties = [IsWave];
}

def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
Expand All @@ -984,7 +968,6 @@ def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
let result = Int32Ty;
let stages = [Stages<DXIL1_0, [all_stages]>];
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
let properties = [IsWave];
}

def WaveActiveAnyTrue : DXILOp<113, waveAnyTrue> {
Expand All @@ -994,7 +977,6 @@ def WaveActiveAnyTrue : DXILOp<113, waveAnyTrue> {
let arguments = [Int1Ty];
let result = Int1Ty;
let stages = [Stages<DXIL1_0, [all_stages]>];
let properties = [IsWave];
}

def WaveActiveAllTrue : DXILOp<114, waveAllTrue> {
Expand All @@ -1004,7 +986,6 @@ def WaveActiveAllTrue : DXILOp<114, waveAllTrue> {
let arguments = [Int1Ty];
let result = Int1Ty;
let stages = [Stages<DXIL1_0, [all_stages]>];
let properties = [IsWave];
}

def WaveReadLaneAt : DXILOp<117, waveReadLaneAt> {
Expand All @@ -1015,7 +996,6 @@ def WaveReadLaneAt : DXILOp<117, waveReadLaneAt> {
let overloads = [Overloads<
DXIL1_0, [HalfTy, FloatTy, DoubleTy, Int1Ty, Int16Ty, Int32Ty, Int64Ty]>];
let stages = [Stages<DXIL1_0, [all_stages]>];
let properties = [IsWave];
}

def WaveActiveOp : DXILOp<119, waveActiveOp> {
Expand Down Expand Up @@ -1058,7 +1038,6 @@ def WaveAllBitCount : DXILOp<135, waveAllOp> {
let arguments = [Int1Ty];
let result = Int32Ty;
let stages = [Stages<DXIL1_0, [all_stages]>];
let properties = [IsWave];
}

def RawBufferLoad : DXILOp<139, rawBufferLoad> {
Expand Down
5 changes: 0 additions & 5 deletions llvm/lib/Target/DirectX/DXILConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ inline Attributes &operator|=(Attributes &a, Attributes &b) {
return a;
}

struct Properties {
#define DXIL_PROPERTY(Name) bool Name = false;
#include "DXILOperation.inc"
};

} // namespace dxil
} // namespace llvm

Expand Down
17 changes: 0 additions & 17 deletions llvm/utils/TableGen/DXILEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ struct DXILOperationDesc {
SmallVector<const Record *> OverloadRecs;
SmallVector<const Record *> StageRecs;
SmallVector<const Record *> AttrRecs;
SmallVector<const Record *> PropRecs;
SmallVector<DXILIntrinsicSelect> IntrinsicSelects;
SmallVector<StringRef, 4>
ShaderStages; // shader stages to which this applies, empty for all.
Expand Down Expand Up @@ -178,12 +177,6 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
AttrRecs.push_back(CR);
}

Recs = R->getValueAsListOfDefs("properties");

// Get property records
for (const Record *CR : Recs)
PropRecs.push_back(CR);

// Get the operation class
OpClass = R->getValueAsDef("OpClass")->getName();

Expand Down Expand Up @@ -427,15 +420,6 @@ static void emitDXILOpAttributes(const RecordKeeper &Records,
OS << "#endif\n\n";
}

/// Emit a list of DXIL op properties
static void emitDXILProperties(const RecordKeeper &Records, raw_ostream &OS) {
OS << "#ifdef DXIL_PROPERTY\n";
for (const Record *Prop : Records.getAllDerivedDefinitions("DXILProperty"))
OS << "DXIL_PROPERTY(" << Prop->getName() << ")\n";
OS << "#undef DXIL_PROPERTY\n";
OS << "#endif\n\n";
}

/// Emit a list of DXIL op function types
static void emitDXILOpFunctionTypes(ArrayRef<DXILOperationDesc> Ops,
raw_ostream &OS) {
Expand Down Expand Up @@ -639,7 +623,6 @@ static void emitDxilOperation(const RecordKeeper &Records, raw_ostream &OS) {
emitDXILOpParamTypes(Records, OS);
emitDXILAttributes(Records, OS);
emitDXILOpAttributes(Records, DXILOps, OS);
emitDXILProperties(Records, OS);
emitDXILOpFunctionTypes(DXILOps, OS);
emitDXILIntrinsicArgSelectTypes(Records, OS);
emitDXILIntrinsicMap(DXILOps, OS);
Expand Down