[PATCH] D48312: [X86] Use binary search of the EVEX->VEX static tables instead of populating two DenseMaps for lookups

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 21:57:30 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, chandlerc.

After r335018, the static tables are guaranteed sorted by the EVEX opcode to convert. We can use this to do a binary search and remove the need for any secondary data structures.

Right now one table is 736 entries and the other is 482 entries. It might make sense to merge the two tables as a follow up. The effort it takes to select the table is probably similar to the extra binary search step it would require for a larger table.

I haven't done any measurements to see if this has any effect on compile time, but I don't imagine that EVEX->VEX conversion is a place we spend a lot of time.


https://reviews.llvm.org/D48312

Files:
  lib/Target/X86/X86EvexToVex.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48312.151849.patch
Type: text/x-patch
Size: 3958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180619/34cef2db/attachment.bin>


More information about the llvm-commits mailing list