[all-commits] [llvm/llvm-project] 31c485: [AArch64CompressJumpTables] Prevent over-compressi...
paulwalker-arm via All-commits
all-commits at lists.llvm.org
Thu Jun 15 05:40:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 31c485c99024edf267b505070f87473fd397eb6a
https://github.com/llvm/llvm-project/commit/31c485c99024edf267b505070f87473fd397eb6a
Author: Paul Walker <paul.walker at arm.com>
Date: 2023-06-15 (Thu, 15 Jun 2023)
Changed paths:
M llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
M llvm/test/CodeGen/AArch64/jump-table-compress.mir
Log Message:
-----------
[AArch64CompressJumpTables] Prevent over-compression caused by invalid alignment.
AArch64CompressJumpTables assumes it can calculate exact block
offsets. This assumption is bogus because getInstSizeInBytes()
only returns an upper bound rather than an exact size. The
assumption is also invalid when a block alignment is bigger than
the function's alignment.
To mitigate both scenarios this patch changes the algorithm to
compute the maximum upper bound for all block offsets. This is
pessimistic but safe because all offsets are treated as unsigned.
Differential Revision: https://reviews.llvm.org/D150009
More information about the All-commits
mailing list