[RISCV] Enable PrimaryKeyEarlyOut on RISCVVPseudosTable.
authorCraig Topper <craig.topper@sifive.com>
Fri, 19 Feb 2021 02:50:58 +0000 (18:50 -0800)
committerCraig Topper <craig.topper@sifive.com>
Fri, 19 Feb 2021 02:59:32 +0000 (18:59 -0800)
commitcf34559104d3531e98e16ea242b777f18d5f95cf
tree98255445e9f2d0aae42268c14d9e95ccb1f6de0f
parentc4ad878acb62d0264072e28f413178d5d8670e49
[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
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td