[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
Loading
Please sign in to comment