Skip to content

Commit

Permalink
vISA: Remove unused operands in IsaDescriptor
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
DianaChen authored and igcbot committed Nov 21, 2023
1 parent 2cb1b41 commit 301dcb0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 34 deletions.
9 changes: 3 additions & 6 deletions visa/IsaDescription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ VISA_INST_Desc CISA_INST_table[ISA_NUM_OPCODE] = {
ISA_3D_SAMPLE,
ISA_Inst_Sampler,
"3d_sample",
10,
9,
0,
{
{OPND_OTHER, ISA_TYPE_UW, 0},
Expand All @@ -2024,7 +2024,6 @@ VISA_INST_Desc CISA_INST_table[ISA_NUM_OPCODE] = {
{OPND_SAMPLE, ISA_TYPE_UB, 0}, /// Sampler
{OPND_SURFACE, ISA_TYPE_UB, 0}, /// Surface
{OPND_RAW, ISA_TYPE_F, GRF_ALIGNED}, /// Destination
{OPND_RAW, ISA_TYPE_UD, 0}, /// Paired Surface
{OPND_OTHER, ISA_TYPE_UB, 0}, /// numberMsgSpecific Operands
},

Expand All @@ -2036,7 +2035,7 @@ VISA_INST_Desc CISA_INST_table[ISA_NUM_OPCODE] = {
ISA_3D_LOAD,
ISA_Inst_Sampler,
"3d_load",
9,
8,
0,
{
{OPND_OTHER, ISA_TYPE_UW, 0},
Expand All @@ -2048,7 +2047,6 @@ VISA_INST_Desc CISA_INST_table[ISA_NUM_OPCODE] = {
{OPND_SURFACE, ISA_TYPE_UB, 0}, /// Surface
{OPND_RAW, ISA_TYPE_F | ISA_TYPE_UD | ISA_TYPE_D,
0}, /// Destination
{OPND_RAW, ISA_TYPE_UD, 0}, /// Paired Surface
{OPND_OTHER, ISA_TYPE_UB, 0}, /// numberMsgSpecific Operands
},

Expand All @@ -2060,7 +2058,7 @@ VISA_INST_Desc CISA_INST_table[ISA_NUM_OPCODE] = {
ISA_3D_GATHER4,
ISA_Inst_Sampler,
"3d_gather4",
10,
9,
0,
{
{OPND_OTHER, ISA_TYPE_UW, 0},
Expand All @@ -2073,7 +2071,6 @@ VISA_INST_Desc CISA_INST_table[ISA_NUM_OPCODE] = {
{OPND_SURFACE, ISA_TYPE_UB, 0}, /// Surface
{OPND_RAW, ISA_TYPE_F | ISA_TYPE_UD | ISA_TYPE_D,
0}, /// Destination
{OPND_RAW, ISA_TYPE_UD, 0}, /// Paired Surface
{OPND_OTHER, ISA_TYPE_UB, 0}, /// numberMsgSpecific Operands
},

Expand Down
12 changes: 0 additions & 12 deletions visa/IsaDisassembly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,10 +1517,6 @@ printInstructionSampler(const print_format_provider_t *header,

// dst
sstr << printOperand(header, inst, i++, opt);

// paired resource
sstr << printOperand(header, inst, i++, opt);

// skip the param count
i++;

Expand Down Expand Up @@ -1563,10 +1559,6 @@ printInstructionSampler(const print_format_provider_t *header,

// dst
sstr << printOperand(header, inst, i++, opt);

// paired resource
sstr << printOperand(header, inst, i++, opt);

// skip the param count
i++;

Expand Down Expand Up @@ -1614,10 +1606,6 @@ printInstructionSampler(const print_format_provider_t *header,

// dst
sstr << printOperand(header, inst, i++, opt);

// paired resource
sstr << printOperand(header, inst, i++, opt);

// skip the param count
i++;

Expand Down
15 changes: 0 additions & 15 deletions visa/IsaVerification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2238,13 +2238,6 @@ void vISAVerifier::verifyInstructionSampler(const CISA_INST *inst) {
"CPS LOD Compensation Enable is only supported for"
" sample, sample_b, sample_b_c, sample_c and LOD");
}
bool isPairedSurface = isNotNullRawOperand(inst, 6);

REPORT_INSTRUCTION(
options,
(isPairedSurface && irBuilder->getPlatform() >= Xe2) ||
!isPairedSurface,
"Paired surface can not be defined on this platform");
break;
}
case ISA_3D_LOAD:
Expand All @@ -2256,14 +2249,6 @@ void vISAVerifier::verifyInstructionSampler(const CISA_INST *inst) {
REPORT_INSTRUCTION(options, irBuilder->getPlatform() >= GENX_SKL,
"Pixel Null Mask Enable only valid for SKL+");
}
bool isPairedSurface =
isNotNullRawOperand(inst, opcode == ISA_3D_LOAD ? 5 : 6);

REPORT_INSTRUCTION(
options,
(isPairedSurface && irBuilder->getPlatform() >= Xe2) ||
!isPairedSurface,
"Paired surface can not be defined on this platform");
break;
}
case ISA_3D_INFO:
Expand Down
1 change: 0 additions & 1 deletion visa/VisaToG4/TranslateSendLdStLsc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ int IR_Builder::translateLscUntypedInst(
case LSC_SLM:
sfid = SFID::SLM;
break;
break;
default:
vISA_ASSERT_UNREACHABLE("invalid SFID for untyped LSC message");
}
Expand Down

0 comments on commit 301dcb0

Please sign in to comment.