1 # Check that BOLT in lite mode processes fragments as expected.
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: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/baz.s -o %t.baz.o
6 # RUN: link_fdata %s %t.o %t.main.fdata
7 # RUN: link_fdata %s %t.baz.o %t.baz.fdata
8 # RUN: merge-fdata %t.main.fdata %t.baz.fdata > %t.fdata
9 # RUN: %clang %cflags %t.o %t.baz.o -o %t.exe -Wl,-q
10 # RUN: llvm-bolt %t.exe -o %t.out --lite=1 --data %t.fdata -v=1 -print-cfg \
11 # RUN: 2>&1 | FileCheck %s
13 # CHECK: BOLT-INFO: processing main.cold.1 as a sibling of non-ignored function
14 # CHECK: BOLT-INFO: processing foo.cold.1/1 as a sibling of non-ignored function
15 # CHECK: BOLT-INFO: processing bar.cold.1/1 as a sibling of non-ignored function
16 # CHECK: BOLT-INFO: processing baz.cold.1 as a sibling of non-ignored function
17 # CHECK: BOLT-INFO: processing baz.cold.1/1 as a sibling of non-ignored function
19 # CHECK: Binary Function "main.cold.1" after building cfg
20 # CHECK: Parent : main
22 # CHECK: Binary Function "foo.cold.1/1" after building cfg
25 # CHECK: Binary Function "bar.cold.1/1" after building cfg
26 # CHECK: Parent : bar/1
28 # CHECK: Binary Function "baz.cold.1" after building cfg
29 # CHECK: Parent : baz{{$}}
31 # CHECK: Binary Function "baz.cold.1/1" after building cfg
32 # CHECK: Parent : baz/1
39 # FDATA: 0 [unknown] 0 1 main 0 1 0
50 # FDATA: 0 [unknown] 0 1 foo 0 1 0
61 # FDATA: 0 [unknown] 0 1 bar/1 0 1 0
72 # FDATA: 0 [unknown] 0 1 baz 0 1 0
81 .type main.cold.1, %function
90 .size main.cold.1, .-main.cold.1
93 .type foo.cold.1, %function
102 .size foo.cold.1, .-foo.cold.1
105 .type bar.cold.1, %function
114 .size bar.cold.1, .-bar.cold.1
117 .type baz.cold.1, %function
126 .size baz.cold.1, .-baz.cold.1
133 # FDATA: 0 [unknown] 0 1 baz/1 0 1 0
142 .type baz.cold.1, %function
151 .size baz.cold.1, .-baz.cold.1