[PATCH] D66337: [AArch64InstrInfo] Stop getInstSizeInBytes returning non-zero for meta instructions.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 02:57:45 PDT 2019


paulwalker-arm created this revision.
paulwalker-arm added reviewers: nickdesaulniers, peter.smith.
Herald added subscribers: llvm-commits, kristof.beyls, javed.absar.
Herald added a project: LLVM.

AArch64InstrInfo::getInstSizeInBytes is incorrectly treating meta
instructions (e.g. CFI_INSTRUCTION) as normal instructions and
giving them a size of 4.

This results in branch relaxation calculating block sizes wrong.
Branch relaxation also considers alignment and thus a single
mistake can result in later blocks being incorrectly sized even
when they themselves do not contain meta instructions.

The net result is we might not relax a branch whose destination is
not within range.


Repository:
  rL LLVM

https://reviews.llvm.org/D66337

Files:
  lib/Target/AArch64/AArch64InstrInfo.cpp
  test/CodeGen/AArch64/branch-relax-block-size.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66337.215551.patch
Type: text/x-patch
Size: 4096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190816/50a8135a/attachment.bin>


More information about the llvm-commits mailing list