Page MenuHomePhabricator

[RISCV] Enable PrimaryKeyEarlyOut on RISCVVPseudosTable.
ClosedPublic

Authored by craig.topper on Feb 18 2021, 6:59 PM.

Details

Summary

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.

Diff Detail

Event Timeline

craig.topper created this revision.Feb 18 2021, 6:59 PM
craig.topper requested review of this revision.Feb 18 2021, 6:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 18 2021, 6:59 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
This revision was not accepted when it landed; it landed in state Needs Review.Feb 18 2021, 7:08 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.