1## Check that YAML profile for non-simple function is not reported as stale. 2 3# RUN: split-file %s %t 4# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/main.s -o %t.o 5# RUN: %clang %cflags %t.o -o %t.exe -nostdlib 6# RUN: llvm-bolt %t.exe -o %t.out --data %t/yaml --profile-ignore-hash -v=1 \ 7# RUN: --report-stale 2>&1 | FileCheck %s 8 9# CHECK: BOLT-INFO: could not disassemble function main. Will ignore. 10# CHECK: BOLT-INFO: could not disassemble function main.cold. Will ignore. 11# CHECK: BOLT-INFO: 0 out of 2 functions in the binary (0.0%) have non-empty execution profile 12# CHECK: BOLT-INFO: 1 function with profile could not be optimized 13 14#--- main.s 15.globl main 16.type main, @function 17main: 18 .cfi_startproc 19.LBB00: 20 pushq %rbp 21 movq %rsp, %rbp 22 subq $16, %rsp 23 testq %rax, %rax 24 js .LBB03 25.LBB01: 26 jne .LBB04 27.LBB02: 28 nop 29.LBB03: 30 xorl %eax, %eax 31 addq $16, %rsp 32 popq %rbp 33 retq 34.LBB04: 35 xorl %eax, %eax 36 addq $16, %rsp 37 popq %rbp 38 retq 39 .cfi_endproc 40 .size main, .-main 41 42.globl main.cold 43.type main.cold, @function 44main.cold: 45 .cfi_startproc 46 nop 47 .cfi_endproc 48 .size main.cold, .-main.cold 49 50#--- yaml 51--- 52header: 53 profile-version: 1 54 binary-name: 'yaml-non-simple.s.tmp.exe' 55 binary-build-id: '<unknown>' 56 profile-flags: [ lbr ] 57 profile-origin: branch profile reader 58 profile-events: '' 59 dfs-order: false 60 hash-func: xxh3 61functions: 62 - name: main 63 fid: 0 64 hash: 0x0000000000000000 65 exec: 1 66 nblocks: 5 67 blocks: 68 - bid: 1 69 insns: 1 70 succ: [ { bid: 3, cnt: 1} ] 71... 72