OSDN Git Service

[X86] Use binary search of the EVEX->VEX static tables instead of populating two...
authorCraig Topper <craig.topper@intel.com>
Wed, 20 Jun 2018 04:32:04 +0000 (04:32 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 20 Jun 2018 04:32:04 +0000 (04:32 +0000)
commit05f7051a703dabd941f474762e3f3f833795fc63
treeba234acf559cd9f1556905aff384c135b77420fe
parentabee837d01a291f05e012822502df81486ef776d
[X86] Use binary search of the EVEX->VEX static tables instead of populating two DenseMaps for lookups

Summary:
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.

Reviewers: RKSimon, spatel, chandlerc

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D48312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335092 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86EvexToVex.cpp