[PATCH] D126116: [X86][BOLT] Use getOperandType to determine memory access size

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 21:21:10 PDT 2022


Amir added inline comments.


================
Comment at: bolt/lib/Target/X86/X86MCPlusBuilder.cpp:1009-1054
+    switch (X86::getOperandType(Inst, MemOpNo)) {
+    default:
+      return 0;
+    case i8mem:
+    case i8mem_NOREX:
+      return 1;
+    case i16mem:
----------------
skan wrote:
> Could we avoid writing this table manually here? We already have similar things e.g `X86Disassembler::getMemOperandSize`? Maybe we can add one bit for class `X86MemAsmOperand`, and auto-generate this table.
Will do


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126116/new/

https://reviews.llvm.org/D126116



More information about the llvm-commits mailing list