[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)
Maksim Panchenko via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri May 3 12:45:51 PDT 2024
================
@@ -24,6 +24,32 @@ READ-BAT-CHECK-NOT: BOLT-ERROR: unable to save profile in YAML format for input
READ-BAT-CHECK: BOLT-INFO: Parsed 5 BAT entries
READ-BAT-CHECK: PERF2BOLT: read 79 aggregated LBR entries
+# Check handling of a branch not in BAT (added by BOLT)
+RUN: FileCheck --input-file %p/Inputs/blarge_new_bat.preagg.txt --check-prefix PREAGG-CHECK %s
+# The branch
+PREAGG-CHECK: B 80007b 80004c 483 1
+RUN: llvm-objdump %t.out -d --start-address=0x80007b --stop-address=0x80007d \
+RUN: | FileCheck %s --check-prefix OBJDUMP-CHECK
+OBJDUMP-CHECK: jmp
+# Confirming it's not in BAT
+RUN: llvm-bat-dump %t.out --dump-all | FileCheck %s --check-prefix BAT-DUMP-CHECK
+BAT-DUMP-CHECK: Function Address: 0x800040, hash: 0x99e67ed32a203023
+# Containing basic block
+BAT-DUMP-CHECK: 0x34 -> 0x32 hash: 0x6c36179f229b0032
+# Branch entry just above
+BAT-DUMP-CHECK-NEXT: 0x37 -> 0x35 (branch)
+# No entry for that offset
+BAT-DUMP-NOT: 0x3b ->
----------------
maksfb wrote:
Is this line intended to be used? Is it needed?
https://github.com/llvm/llvm-project/pull/90811
More information about the llvm-branch-commits
mailing list