[PATCH] D117970: [AArch64] Make getInstSizeInBytes() use instruction size from InstrInfo.td

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 12:08:10 PST 2022


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:97-100
   default:
     // Anything not explicitly designated otherwise is a normal 4-byte insn.
     NumBytes = 4;
     break;
----------------
should this case become `llvm_unreachable` now?


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:119
-  case AArch64::TLSDESC_CALLSEQ:
-    // This gets lowered to an instruction sequence which takes 16 bytes
-    NumBytes = 16;
----------------
lenary wrote:
> I am slighly concerned about losing these comments - could you move them to the tablegen too (as the tablegen also doesn't tell us what they're eventually lowered to)
+1

Also, perhaps a comment at the top of this `switch` to prefer setting a `Size` for new insts in llvm/lib/Target/AArch64/AArch64InstrInfo.td when possible?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117970



More information about the llvm-commits mailing list