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

Tulio Magno Quites Machado Filho via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 21 10:06:13 PDT 2025


tuliom wrote:

Test `indirect-goto-relocs.test` is failing on aarch64 in the `CHECK-NO-PIE-NOT` scenario:

```
RUN: at line 8: /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/bin/llvm-bolt --runtime-instrumentation-lib=/builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/test/Output/indirect-goto-relocs.test.tmp.exe -o /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/test/Output/indirect-goto-relocs.test.tmp.bolt --print-cfg | /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/bin/FileCheck --check-prefix=CHECK-NO-PIE /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/bolt/test/indirect-goto-relocs.test
+ /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/bin/llvm-bolt --runtime-instrumentation-lib=/builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/test/Output/indirect-goto-relocs.test.tmp.exe -o /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/tools/bolt/test/Output/indirect-goto-relocs.test.tmp.bolt --print-cfg
+ /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/llvm/redhat-linux-build/bin/FileCheck --check-prefix=CHECK-NO-PIE /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/bolt/test/indirect-goto-relocs.test
/builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/bolt/test/indirect-goto-relocs.test:18:19: error: CHECK-NO-PIE-NOT: excluded string found in input
CHECK-NO-PIE-NOT: IsMultiEntry: 1
                  ^
<stdin>:365:2: note: found here
 IsMultiEntry: 1
 ^~~~~~~~~~~~~~~
/builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/bolt/test/indirect-goto-relocs.test:19:19: error: CHECK-NO-PIE-NOT: excluded string found in input
CHECK-NO-PIE-NOT: Secondary Entry Points : {{.*}}
                  ^
<stdin>:369:2: note: found here
 Secondary Entry Points : __ENTRY_.Ltmp3, __ENTRY_.Ltmp2, __ENTRY_.Ltmp1
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Input file: <stdin>
Check file: /builddir/build/BUILD/llvm-21.0.0_pre20250321.gfe6bced9e40f7d-build/llvm-project-fe6bced9e40f7d4c35550c51ef9cdc7be2a055e7/bolt/test/indirect-goto-relocs.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
        .
        .
        .
      360:  Offset : 0x76c 
      361:  Section : .text 
      362:  Orc Section : .local.text.main 
      363:  LSDA : 0x0 
      364:  IsSimple : 0 
      365:  IsMultiEntry: 1 
not:18      !~~~~~~~~~~~~~~  error: no match expected
      366:  IsSplit : 0 
      367:  BB Count : 6 
      368:  Hash : b6244c5a20ea24fa 
      369:  Secondary Entry Points : __ENTRY_.Ltmp3, __ENTRY_.Ltmp2, __ENTRY_.Ltmp1 
not:19      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: no match expected
      370:  CFI Instrs : 5 
      371:  BB Layout : .LBB07, .Ltmp8, .Ltmp1, .Ltmp2, .Ltmp3, .Ltmp9 
      372: } 
      373: .LBB07 (16 instructions, align : 1) 
      374:  Entry Point 
        .
        .
        .
>>>>>>

```
@Rin18 , can you reproduce this?

A full log is available at: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20250321/fedora-rawhide-aarch64/08800037-llvm/builder-live.log.gz

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


More information about the llvm-commits mailing list