[ARM] Make getInstSizeInBytes() use instruction size from InstrInfo.td
authortyb0807 <sontuan.vu@arm.com>
Sun, 23 Jan 2022 22:29:33 +0000 (22:29 +0000)
committertyb0807 <sontuan.vu@arm.com>
Tue, 1 Feb 2022 10:39:14 +0000 (10:39 +0000)
commit762f0b5463286c6cbe585e44e2830ee0e5b6c40b
tree0c3e9bef96f122549b89f87ea8088131c1482765
parentdd88f40c80f54e5f66b5ead1787f88c376b61d8a
[ARM] Make getInstSizeInBytes() use instruction size from InstrInfo.td

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

Differential Revision: https://reviews.llvm.org/D118009
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/lib/Target/ARM/ARMInstrInfo.td
llvm/lib/Target/ARM/ARMInstrThumb.td
llvm/lib/Target/ARM/ARMInstrThumb2.td
llvm/unittests/Target/ARM/CMakeLists.txt
llvm/unittests/Target/ARM/InstSizes.cpp [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/unittests/Target/ARM/BUILD.gn