[llvm-branch-commits] [llvm] [BOLT] Match blocks with pseudo probes (PR #99891)
Lei Wang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 18 11:28:39 PDT 2024
================
@@ -0,0 +1,62 @@
+## Tests stale block matching with pseudo probes.
+
+# REQUIRES: system-linux
+# RUN: split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/main.s -o %t.o
+# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
+# RUN: llvm-bolt %t.exe -o %t.out --data %t/yaml -v=2 \
+# RUN: --print-cfg --funcs=main --profile-ignore-hash=0 --infer-stale-profile --profile-use-pseudo-probes --stale-matching-with-block-pseudo-probes 2>&1 | FileCheck %s
+
+# CHECK: BOLT-INFO: inference found a pseudo probe match for 100.00% of basic blocks (1 out of 1 stale) responsible for -nan% samples (0 out of 0 stale)
+
+#--- main.s
+ .text
+ .globl main # -- Begin function main
+ .p2align 4, 0x90
+ .type main, at function
+main: # @main
+# %bb.0:
+ pushq %rbp
+ movq %rsp, %rbp
+ movl $0, -4(%rbp)
+ .pseudoprobe 15822663052811949562 1 0 0 main
----------------
wlei-llvm wrote:
I think this comment is still valid? could you add the testcase to check the feature of inline tree matching?
https://github.com/llvm/llvm-project/pull/99891
More information about the llvm-branch-commits
mailing list