[llvm] [X86][MC] Compress APX Promoted instrs from evex to legacy encoding to save code size. (PR #77065)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 03:04:20 PST 2024


================
@@ -40,28 +45,54 @@ class X86EVEX2VEXTablesEmitter {
   std::vector<Entry> EVEX2VEX128;
   std::vector<Entry> EVEX2VEX256;
 
+  // Hold all possibly compressed APX instructions, including only ND and EGPR
+  // instruction so far
+  std::vector<const CodeGenInstruction *> APXInsts;
+  // Hold all X86 instructions. Divided into groups with same opcodes
+  // to make the search more efficient
----------------
KanRobert wrote:

The logic in this file seems too complicated. I think we can merge the table EVEX2VEX128 and EVEX2VEX256 in a separate patch since the searching algorithm is O(lgn). And use the same table for the APX.

https://github.com/llvm/llvm-project/pull/77065


More information about the llvm-commits mailing list