[llvm] [BOLT] Support computed goto and allow map addrs inside functions. (PR #120267)

Rin Dobrescu via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 05:45:41 PST 2025


================
@@ -0,0 +1,39 @@
+# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
+# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
+# RUN: llvm-bolt %t.exe -o %t.bolt 2>&1 | FileCheck %s
+
+## Before bolt could handle mapping addresses within moved functions, it
+## would bail out with an error of the form:
+## BOLT-ERROR: unable to get new address corresponding to input address 0x10390 in function main. Consider adding this function to --skip-funcs=...
+## These addresses arise if computed GOTO is in use.
+## Check that bolt does not emit any error.
+
+# CHECK-NOT: BOLT-ERROR
----------------
Rin18 wrote:

I've expanded the test. Let me know if there's anything else I've missed to cover.

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


More information about the llvm-commits mailing list