[RISCV] Enable PrimaryKeyEarlyOut on RISCVVPseudosTable.

This table is queried in RISCVMCInstLower without knowing
whether the instruction is a vector pseudo. Due to the way the
binary search works, we have to do log2(tablesize) checks just
to determine a non-vector instruction isn't in the table.

Conveniently, all the vector pseudos are pretty tightly
packed within the internal instruction enum. By enabling the
PrimaryKeyEarlyOut, tablegen will emit a check against the
beginning and end of the table before doing the binary search.
This gives a quick early out on the search for the majority
of non-vector instructions.

Differential Revision: https://reviews.llvm.org/D97016
This commit is contained in:
Craig Topper 2021-02-18 18:50:58 -08:00
parent c4ad878acb
commit cf34559104
1 changed files with 1 additions and 0 deletions

View File

@ -402,6 +402,7 @@ def RISCVVPseudosTable : GenericTable {
let Fields = [ "Pseudo", "BaseInstr" ];
let PrimaryKey = [ "Pseudo" ];
let PrimaryKeyName = "getPseudoInfo";
let PrimaryKeyEarlyOut = true;
}
def RISCVVIntrinsicsTable : GenericTable {