diff options
author | Amir Ayupov <aaupov@fb.com> | 2023-01-25 11:37:55 -0800 |
---|---|---|
committer | Amir Ayupov <aaupov@fb.com> | 2023-01-25 11:43:10 -0800 |
commit | 287508cd9c4396c8845d92310d258879202a179e (patch) | |
tree | 1555541af04c0c4bc0104bcf49408e8db7118f34 /bolt/test | |
parent | e20074053da8cfad101f2752fd2e8fb0224ec21c (diff) | |
download | llvm-287508cd9c4396c8845d92310d258879202a179e.tar.gz |
[BOLT] Use LTO fuzzy name matching in function-order
Allow partial name matching wrt LTO suffixes in `function-order`
user-supplied function list, the same as permitted by profile matching.
Reviewed By: #bolt, rafauler
Differential Revision: https://reviews.llvm.org/D142269
Diffstat (limited to 'bolt/test')
-rw-r--r-- | bolt/test/X86/Inputs/order-lite.txt | 1 | ||||
-rw-r--r-- | bolt/test/X86/function-order-lite.s | 17 |
2 files changed, 16 insertions, 2 deletions
diff --git a/bolt/test/X86/Inputs/order-lite.txt b/bolt/test/X86/Inputs/order-lite.txt index ba2906d0666c..60eb1e387620 100644 --- a/bolt/test/X86/Inputs/order-lite.txt +++ b/bolt/test/X86/Inputs/order-lite.txt @@ -1 +1,2 @@ main +foo.__uniq.321 diff --git a/bolt/test/X86/function-order-lite.s b/bolt/test/X86/function-order-lite.s index 05af73da7815..5cedc833b089 100644 --- a/bolt/test/X86/function-order-lite.s +++ b/bolt/test/X86/function-order-lite.s @@ -8,8 +8,9 @@ # RUN: --function-order=%p/Inputs/order-lite.txt -o %t -print-all 2>&1 \ # RUN: | FileCheck %s -# CHECK: 1 out of 2 functions in the binary (50.0%) have non-empty execution profile -# CHECK: Binary Function "main" after reorder-functions +# CHECK: 1 out of 3 functions in the binary (33.3%) have non-empty execution profile +# CHECK-DAG: Binary Function "main" after reorder-functions +# CHECK-DAG: Binary Function "foo.__uniq.123" after reorder-functions .globl main .type main, %function @@ -33,3 +34,15 @@ testfunc: retq .cfi_endproc .size testfunc, .-testfunc + + .globl foo.__uniq.123 + .type foo.__uniq.123, %function +foo.__uniq.123: + .cfi_startproc + pushq %rbp + movq %rsp, %rbp + movl $0x0, %eax + popq %rbp + retq + .cfi_endproc +.size foo.__uniq.123, .-foo.__uniq.123 |