[PATCH] D97016: [RISCV] Enable PrimaryKeyEarlyOut on RISCVVPseudosTable.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 18 18:59:34 PST 2021
craig.topper created this revision.
craig.topper added reviewers: HsiangKai, evandro, rogfer01, frasercrmck, khchen, arcbbb, asb.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D97016
Files:
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Index: llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
@@ -402,6 +402,7 @@
let Fields = [ "Pseudo", "BaseInstr" ];
let PrimaryKey = [ "Pseudo" ];
let PrimaryKeyName = "getPseudoInfo";
+ let PrimaryKeyEarlyOut = true;
}
def RISCVVIntrinsicsTable : GenericTable {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97016.324839.patch
Type: text/x-patch
Size: 448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210219/25efd9b6/attachment.bin>
More information about the llvm-commits
mailing list