Skip to content

[BOLT][RISCV] Support split function fragments - #219965

Closed
Thrrreeee wants to merge 2 commits into
llvm:mainfrom
Thrrreeee:fix-split-func
Closed

Thrrreeee wants to merge 2 commits into
llvm:mainfrom
Thrrreeee:fix-split-func

Conversation

@Thrrreeee

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

✅ With the latest revision this PR passed the C/C++ code formatter.

@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

🐧 Linux x64 Test Results

  • 733 tests passed
  • 62 tests skipped
  • 1 test failed

Failed Tests

(click on a test name to see its output)

BOLT

BOLT.RISCV/split-functions-long-jump.s
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: fd40c24d5d93e592587aab009ea156c5a712cd0a
# | 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 --show-all-symbols /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 --show-all-symbols /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump: warning: '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.bolt': could not parse ISA mapping symbol '$xrv64i2p1_c2p0_zca1p0.cold.0': string may only contain [a-z0-9_]; falling back to default disassembler
# `-----------------------------
# 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-readobj --symbols /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-readobj --symbols /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: fd40c24d5d93e592587aab009ea156c5a712cd0a
# | 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 --show-all-symbols /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 --show-all-symbols /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.bolt
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump: warning: '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/RISCV/Output/split-functions-long-jump.s.tmp.32.bolt': could not parse ISA mapping symbol '$xrv32i2p1_c2p0_zca1p0.cold.0': string may only contain [a-z0-9_]; falling back to default disassembler
# `-----------------------------
# 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:23:16: error: CHECK-LABEL: expected string not found in input
# | # CHECK-LABEL: <secondary>:
# |                ^
# | <stdin>:16:19: note: scanning from here
# | 00400000 <_start>:
# |                   ^
# | <stdin>:25:31: note: possible intended match here
# | 00400040 <$xrv32i2p1_c2p0_zca1p0.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:
# | <<<<<<
# |             .
# |             .
# |             .
# |            11:  110bc: 8082 ret 
# |            12:  
# |            13: Disassembly of section .text: 
# |            14:  
# |            15: 00400000 <$xrv32i2p1_c2p0_zca1p0>: 
# |            16: 00400000 <_start>: 
# | label:23'0                      {   search range start (exclusive)
# | label:23'1                          error: no match found in search range
# |            17:  400000: c509 beqz a0, 0x40000a <_start+0xa> 
# |            18:  400002: 00000517 auipc a0, 0x0 
# |            19:  400006: 03e50067 jr 0x3e(a0) <_start.cold.0> 
# |            20:  40000a: 00000517 auipc a0, 0x0 
# |            21:  40000e: 03a50067 jr 0x3a(a0) <_start.cold.0+0x4> 
# |            22:  
# |            23: Disassembly of section .text.cold: 
# |            24:  
# |            25: 00400040 <$xrv32i2p1_c2p0_zca1p0.cold.0>: 
# | label:23'2                                   ?             possible intended match
# |            26: 00400040 <_start.cold.0>: 
# |            27:  400040: 4505 li a0, 0x1 
# |            28:  400042: 8082 ret 
# |            29:  400044: 4509 li a0, 0x2 
# |            30:  400046: 8082 ret 
# | label:23'3                       } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

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.

@Thrrreeee Thrrreeee closed this Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant