[llvm-branch-commits] [BOLT][AArch64] Add jump table support using .llvm_jump_table_info (PR #132114)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 3 15:28:50 PDT 2025


================
@@ -704,7 +713,10 @@ void BinaryContext::populateJumpTables() {
 
     uint64_t NextJTAddress = 0;
     auto NextJTI = std::next(JTI);
-    if (NextJTI != JTE)
+    if (isAArch64()) {
----------------
aaupov wrote:

Thanks for a suggestion, this part is a bit nuanced and needs a comment.
First, there's an implicit assumption that on ARM jump tables are only created in JumpTableInfoReader, not through instruction sequence/memory analysis as on X86.
Second, since jump table size is known in advance, NextJTAddress is just used as end address. It's not actually used to find the next jump table (neither on X86).

https://github.com/llvm/llvm-project/pull/132114


More information about the llvm-branch-commits mailing list