[PATCH] D144470: [ARM] Remove redundant BTI instructions for table jumps
Jirui Wu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 03:52:55 PST 2023
JiruiWu created this revision.
JiruiWu added reviewers: olista01, chill, lenary.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
JiruiWu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
A BTI instruction was previously inserted at the beginning of each block
that has its address stored in a jump table. Jump tables only emit
indirect jumps in ARM or Thumb1 modes. However, PACBTI is not supported
in these modes. As a result, BTI instructions emitted by jump tables are
redundant. Removing redundant BTI instructions improves the code size
and prevents potential gadgets.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144470
Files:
llvm/lib/Target/ARM/ARMBranchTargets.cpp
llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
llvm/test/CodeGen/Thumb2/bti-indirect-branches.ll
llvm/test/CodeGen/Thumb2/bti-jump-table.mir
llvm/test/MC/AArch64/remove-redundant-bti.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144470.499105.patch
Type: text/x-patch
Size: 6987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230221/70929ccf/attachment.bin>
More information about the llvm-commits
mailing list