Skip to content

Commit b71715d

Browse files
wangpc-ppZijunZhaoCCK
authored andcommitted
[RISCV] Specify FilterClassField to filter out unneeded pseudos (llvm#65460)
`VMCLR` and `VMSET` will be expanded before MC emitting, so we don't need them being in RISCVVPseudosTable.
1 parent 0549202 commit b71715d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,13 @@ class RISCVVPseudo {
527527
Instruction BaseInstr = !cast<Instruction>(PseudoToVInst<NAME>.VInst);
528528
// SEW = 0 is used to denote that the Pseudo is not SEW specific (or unknown).
529529
bits<8> SEW = 0;
530+
bit NeedBeInPseudoTable = 1;
530531
}
531532

532533
// The actual table.
533534
def RISCVVPseudosTable : GenericTable {
534535
let FilterClass = "RISCVVPseudo";
536+
let FilterClassField = "NeedBeInPseudoTable";
535537
let CppTypeName = "PseudoInfo";
536538
let Fields = [ "Pseudo", "BaseInstr" ];
537539
let PrimaryKey = [ "Pseudo" ];
@@ -998,6 +1000,8 @@ class VPseudoNullaryPseudoM<string BaseInst> :
9981000
// BaseInstr is not used in RISCVExpandPseudoInsts pass.
9991001
// Just fill a corresponding real v-inst to pass tablegen check.
10001002
let BaseInstr = !cast<Instruction>(BaseInst);
1003+
// We exclude them from RISCVVPseudoTable.
1004+
let NeedBeInPseudoTable = 0;
10011005
}
10021006

10031007
class VPseudoUnaryNoMask<DAGOperand RetClass,

0 commit comments

Comments
 (0)