[llvm] [BOLT][RISCV] Improve relocations, jump tables, and split-function handling (PR #213919)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 4 05:20:25 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 718 tests passed
* 61 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### BOLT
<details>
<summary>BOLT.RISCV/split-functions-long-jump.s</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 5
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple riscv64 -mattr=+c -filetype=obj -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.o /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple riscv64 -mattr=+c -filetype=obj -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.o /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld --emit-relocs -e _start -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.exe /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld --emit-relocs -e _start -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.exe /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.o
# note: command had no output on stdout or stderr
# RUN: at line 7
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.exe -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt -split-functions    -split-strategy=random2 -bolt-seed=1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.exe -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt -split-functions -split-strategy=random2 -bolt-seed=1
# .---command stdout------------
# | BOLT-INFO: Target architecture: riscv64
# | BOLT-INFO: BOLT version: aaa015b26dc9bafc08194410ac8a678d3fd2f576
# | BOLT-INFO: first alloc address is 0x10000
# | BOLT-INFO: creating new program header table at address 0x210000, offset 0x200000
# | BOLT-INFO: enabling relocation mode
# | BOLT-INFO: static input executable detected
# | BOLT-INFO: 0 out of 1 functions in the binary (0.0%) have non-empty execution profile
# | BOLT-INFO: relaxing RISC-V cross-fragment branches
# `-----------------------------
# RUN: at line 9
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# note: command had no output on stdout or stderr
# RUN: at line 10
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=SYMBOLS /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-readelf -s /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=SYMBOLS /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# note: command had no output on stdout or stderr
# RUN: at line 11
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple riscv32 -mattr=+c -filetype=obj -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.o /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-mc -triple riscv32 -mattr=+c -filetype=obj -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.o /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# note: command had no output on stdout or stderr
# RUN: at line 12
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld --emit-relocs -e _start -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.exe /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.o
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/ld.lld --emit-relocs -e _start -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.exe /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.o
# note: command had no output on stdout or stderr
# RUN: at line 13
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.exe -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.bolt -split-functions    -split-strategy=random2 -bolt-seed=1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.exe -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.bolt -split-functions -split-strategy=random2 -bolt-seed=1
# .---command stdout------------
# | BOLT-INFO: Target architecture: riscv32
# | BOLT-INFO: BOLT version: aaa015b26dc9bafc08194410ac8a678d3fd2f576
# | BOLT-INFO: first alloc address is 0x10000
# | BOLT-INFO: creating new program header table at address 0x210000, offset 0x200000
# | BOLT-INFO: enabling relocation mode
# | BOLT-INFO: static input executable detected
# | BOLT-INFO: 0 out of 1 functions in the binary (0.0%) have non-empty execution profile
# | BOLT-INFO: relaxing RISC-V cross-fragment branches
# `-----------------------------
# RUN: at line 15
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.bolt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.bolt
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s:29:16: error: CHECK-LABEL: expected string not found in input
# | # CHECK-LABEL: <secondary>:
# |                ^
# | <stdin>:15:19: note: scanning from here
# | 00400000 <_start>:
# |                   ^
# | <stdin>:24:15: note: possible intended match here
# | 00400040 <_start.cold.0>:
# |               ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/RISCV/split-functions-long-jump.s
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            10:  110ba: 4509 li a0, 0x2 
# |            11:  110bc: 8082 ret 
# |            12:  
# |            13: Disassembly of section .text: 
# |            14:  
# |            15: 00400000 <_start>: 
# | label:29'0                      {   search range start (exclusive)
# | label:29'1                          error: no match found in search range
# |            16:  400000: c509 beqz a0, 0x40000a <_start+0xa> 
# |            17:  400002: 00000297 auipc t0, 0x0 
# |            18:  400006: 03e28067 jr 0x3e(t0) <_start.cold.0> 
# |            19:  40000a: 00000297 auipc t0, 0x0 
# |            20:  40000e: 03a28067 jr 0x3a(t0) <_start.cold.0+0x4> 
# |            21:  
# |            22: Disassembly of section .text.cold: 
# |            23:  
# |            24: 00400040 <_start.cold.0>: 
# | label:29'2                   ?             possible intended match
# |            25:  400040: 4505 li a0, 0x1 
# |            26:  400042: 8082 ret 
# |            27:  400044: 4509 li a0, 0x2 
# |            28:  400046: 8082 ret 
# | label:29'3                       } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

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


More information about the llvm-commits mailing list