[X86][BOLT] Use getOperandType to determine memory access size
authorAmir Ayupov <aaupov@fb.com>
Mon, 13 Jun 2022 21:46:43 +0000 (14:46 -0700)
committerAmir Ayupov <aaupov@fb.com>
Thu, 30 Jun 2022 07:25:32 +0000 (00:25 -0700)
commitcb75faf40cb1140ba29ad684b084fbf398443deb
treea528d0134473a8112e9ba3e635c76b15e2c882ae
parent10c531cd5bf0166ce5bf42736506733b2285fdf8
[X86][BOLT] Use getOperandType to determine memory access size

Generate INSTRINFO_OPERAND_TYPE table in X86GenInstrInfo.inc.

This diff adds support for instructions that were previously reported as having
memory access size 0. It replaces the heuristic of looking at instruction
register width to determine memory access width by instead checking the memory
operand type using tablegen-provided tables.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D126116
bolt/lib/Target/X86/X86MCPlusBuilder.cpp
llvm/lib/Target/X86/CMakeLists.txt