[llvm] [AArch64] Add a fast-path for AArch64InstrInfo::getInstSizeInBytes (NFC) (PR #221894)
Cullen Rhodes via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 8 01:01:50 PDT 2026
================
@@ -204,6 +204,10 @@ static std::optional<unsigned> getLFIInstSizeInBytes(const MachineInstr &MI) {
/// GetInstSize - Return the number of bytes of code the specified
/// instruction may be. This returns the maximum number of bytes.
unsigned AArch64InstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
+ const MCInstrDesc &Desc = MI.getDesc();
+ if (!Desc.isPseudo() && !Subtarget.isLFI())
+ return 4;
----------------
c-rhodes wrote:
doesn't look like it's used elsewhere, the ISA changing seems very unlikely but assert is a good idea nonetheless
https://github.com/llvm/llvm-project/pull/221894
More information about the llvm-commits
mailing list