[PATCH] D24073: [AArch64] Support stackmap/patchpoint in getInstSizeInBytes

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 05:06:47 PDT 2016


rovka created this revision.
rovka added reviewers: t.p.northover, reames, kavon.
rovka added subscribers: llvm-commits, rengolin.
Herald added a subscriber: aemerson.

We currently return 4 for stackmaps and patchpoints, which is very optimistic
and can in rare cases cause the branch relaxation pass to fail to relax certain
branches.

This patch causes getInstSizeInBytes to return a pessimistic estimate of the
size as the number of bytes requested in the stackmap/patchpoint. In the future,
we could provide a more accurate estimate by sharing some of the logic in
AArch64::LowerSTACKMAP/PATCHPOINT.

Fixes part of https://llvm.org/bugs/show_bug.cgi?id=28750

https://reviews.llvm.org/D24073

Files:
  lib/Target/AArch64/AArch64InstrInfo.cpp
  test/CodeGen/MIR/AArch64/inst-size-patchpoint.mir
  test/CodeGen/MIR/AArch64/inst-size-stackmap.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24073.69832.patch
Type: text/x-patch
Size: 8440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160831/11e7852c/attachment.bin>


More information about the llvm-commits mailing list