Skip to content

Commit 084d969

Browse files
committed
correct ReadNone/ReadOnly function attributes
- correct all uses of ReadOnly/ReadNone to be consistent with hctdb.py in DXC - all fix order of attributes in each op
1 parent 10e3f7b commit 084d969

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

llvm/lib/Target/DirectX/DXIL.td

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ def CreateHandle : DXILOp<57, createHandle> {
729729
let arguments = [Int8Ty, Int32Ty, Int32Ty, Int1Ty];
730730
let result = HandleTy;
731731
let stages = [Stages<DXIL1_0, [all_stages]>, Stages<DXIL1_6, [removed]>];
732+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
732733
}
733734

734735
def BufferLoad : DXILOp<68, bufferLoad> {
@@ -740,6 +741,7 @@ def BufferLoad : DXILOp<68, bufferLoad> {
740741
[Overloads<DXIL1_0,
741742
[ResRetHalfTy, ResRetFloatTy, ResRetInt16Ty, ResRetInt32Ty]>];
742743
let stages = [Stages<DXIL1_0, [all_stages]>];
744+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
743745
}
744746

745747
def BufferStore : DXILOp<69, bufferStore> {
@@ -825,8 +827,8 @@ def Dot4AddI8Packed : DXILOp<163, dot4AddPacked> {
825827
let LLVMIntrinsic = int_dx_dot4add_i8packed;
826828
let arguments = [Int32Ty, Int32Ty, Int32Ty];
827829
let result = Int32Ty;
828-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
829830
let stages = [Stages<DXIL1_0, [all_stages]>];
831+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
830832
}
831833

832834
def Dot4AddU8Packed : DXILOp<164, dot4AddPacked> {
@@ -835,22 +837,24 @@ def Dot4AddU8Packed : DXILOp<164, dot4AddPacked> {
835837
let LLVMIntrinsic = int_dx_dot4add_u8packed;
836838
let arguments = [Int32Ty, Int32Ty, Int32Ty];
837839
let result = Int32Ty;
838-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
839840
let stages = [Stages<DXIL1_0, [all_stages]>];
841+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
840842
}
841843

842844
def AnnotateHandle : DXILOp<216, annotateHandle> {
843845
let Doc = "annotate handle with resource properties";
844846
let arguments = [HandleTy, ResPropsTy];
845847
let result = HandleTy;
846848
let stages = [Stages<DXIL1_6, [all_stages]>];
849+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
847850
}
848851

849852
def CreateHandleFromBinding : DXILOp<217, createHandleFromBinding> {
850853
let Doc = "create resource handle from binding";
851854
let arguments = [ResBindTy, Int32Ty, Int1Ty];
852855
let result = HandleTy;
853856
let stages = [Stages<DXIL1_6, [all_stages]>];
857+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
854858
}
855859

856860
def WaveIsFirstLane : DXILOp<110, waveIsFirstLane> {
@@ -859,7 +863,6 @@ def WaveIsFirstLane : DXILOp<110, waveIsFirstLane> {
859863
let arguments = [];
860864
let result = Int1Ty;
861865
let stages = [Stages<DXIL1_0, [all_stages]>];
862-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
863866
}
864867

865868
def WaveReadLaneAt: DXILOp<117, waveReadLaneAt> {
@@ -869,7 +872,6 @@ def WaveReadLaneAt: DXILOp<117, waveReadLaneAt> {
869872
let result = OverloadTy;
870873
let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy, DoubleTy, Int1Ty, Int16Ty, Int32Ty, Int64Ty]>];
871874
let stages = [Stages<DXIL1_0, [all_stages]>];
872-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
873875
}
874876

875877
def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
@@ -878,7 +880,7 @@ def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
878880
let arguments = [];
879881
let result = Int32Ty;
880882
let stages = [Stages<DXIL1_0, [all_stages]>];
881-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
883+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
882884
}
883885

884886
def WaveAllBitCount : DXILOp<135, waveAllOp> {
@@ -887,5 +889,4 @@ def WaveAllBitCount : DXILOp<135, waveAllOp> {
887889
let arguments = [Int1Ty];
888890
let result = Int32Ty;
889891
let stages = [Stages<DXIL1_0, [all_stages]>];
890-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
891892
}

0 commit comments

Comments
 (0)