[AArch64] Make getInstSizeInBytes() use instruction size from InstrInfo.td
authortyb0807 <sontuan.vu@arm.com>
Sat, 22 Jan 2022 10:31:56 +0000 (10:31 +0000)
committertyb0807 <sontuan.vu@arm.com>
Tue, 1 Feb 2022 10:39:14 +0000 (10:39 +0000)
commitdd88f40c80f54e5f66b5ead1787f88c376b61d8a
tree037fb1708d0e2feb52edfd698cac169ab1a0acc4
parentb00bce2a93b3c14379e088225c45a341ad75ba0f
[AArch64] Make getInstSizeInBytes() use instruction size from InstrInfo.td

Currently, AArch64InstrInfo::getInstSizeInBytes() uses hard-coded
instruction size for some pseudo-instructions, while this
information should ideally be found in AArch64InstrInfo.td file (which
can be accessed via MCInstrDesc). Hence, the .td file should be updated
and no hard-coded instruction sizes should be used by
getInstSizeInBytes() anymore.

Differential Revision: https://reviews.llvm.org/D117970
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/unittests/Target/AArch64/InstSizes.cpp