[PATCH] D157124: [CodeGen][AArch64] Don't split jump table basic blocks
Daniel Hoekwater via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 4 11:46:01 PDT 2023
dhoekwater created this revision.
dhoekwater added reviewers: shenhan, xur, snehasish, wenlei, mingmingl.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dhoekwater requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Jump tables on AArch64 are label-relative rather than table-relative, so
having jump table destinations that are in different sections causes
problems with relocation. Jump table lookups have a max range of 1MB, so
all destinations must be in the same section as the lookup code. Both of
these restrictions can be mitigated with some careful and complex logic,
but doing so doesn't gain a huge performance benefit.
Efficiently ensuring jump tables are correct and can be compressed on
AArch64 is a TODO item. In the meantime, don't split blocks that can
cause problems.
Depends on D157063 <https://reviews.llvm.org/D157063>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D157124
Files:
llvm/include/llvm/CodeGen/TargetInstrInfo.h
llvm/lib/CodeGen/MachineFunctionSplitter.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.h
llvm/test/CodeGen/AArch64/machine-function-splitter.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157124.547295.patch
Type: text/x-patch
Size: 7128 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/e9033e6a/attachment.bin>
More information about the llvm-commits
mailing list