[X86][NFC] Move table from getRelaxedOpcodeArith into its own class
authorAmir Ayupov <aaupov@fb.com>
Fri, 21 Jan 2022 07:34:53 +0000 (23:34 -0800)
committerAmir Ayupov <aaupov@fb.com>
Sat, 12 Mar 2022 17:06:17 +0000 (09:06 -0800)
commit999fa9f68788d51c109b41b9d194dd3ff9a306f5
tree89b06c14848a396bb3ebdadf18355a3147962f1a
parented98c1b37661b0795a5e34517941485f0f0688d1
[X86][NFC] Move table from getRelaxedOpcodeArith into its own class

Move out the table and prepare the code to reuse it for the reverse mapping.
Follows the example of memory folding/unfolding tables in X86InstrFoldTables.cpp

Preparation step to unify `llvm::X86::getRelaxedOpcodeArith` and
`getShortArithOpcode` in BOLT X86MCPlusBuilder.cpp.

Addresses https://lists.llvm.org/pipermail/llvm-dev/2022-January/154526.html

Reviewed By: skan, MaskRay

Differential Revision: https://reviews.llvm.org/D121402
llvm/lib/Target/X86/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
llvm/lib/Target/X86/MCTargetDesc/X86InstrRelaxTables.cpp [new file with mode: 0644]
llvm/lib/Target/X86/MCTargetDesc/X86InstrRelaxTables.h [new file with mode: 0644]