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: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/baz2.s -o %t.baz2.o
7 # RUN: link_fdata %s %t.o %t.main.fdata
8 # RUN: link_fdata %s %t.baz.o %t.baz.fdata
9 # RUN: link_fdata %s %t.baz2.o %t.baz2.fdata
10 # RUN: merge-fdata %t.main.fdata %t.baz.fdata %t.baz2.fdata > %t.fdata
11 # RUN: %clang %cflags %t.o %t.baz.o %t.baz2.o -o %t.exe -Wl,-q
12 # RUN: llvm-bolt %t.exe -o %t.out --lite=1 --data %t.fdata -v=1 -print-cfg \
13 # RUN: 2>&1 | FileCheck %s
15 # CHECK: BOLT-INFO: processing main.cold.1 as a sibling of non-ignored function
16 # CHECK: BOLT-INFO: processing foo.cold.1/1(*2) as a sibling of non-ignored function
17 # CHECK: BOLT-INFO: processing bar.cold.1/1(*2) as a sibling of non-ignored function
18 # CHECK: BOLT-INFO: processing baz.cold.1 as a sibling of non-ignored function
19 # CHECK: BOLT-INFO: processing baz.cold.1/1(*2) as a sibling of non-ignored function
20 # CHECK: BOLT-INFO: processing baz.cold.1/2(*2) as a sibling of non-ignored function
22 # CHECK: Binary Function "main.cold.1" after building cfg
23 # CHECK: Parent : main
25 # CHECK: Binary Function "foo.cold.1/1(*2)" after building cfg
28 # CHECK: Binary Function "bar.cold.1/1(*2)" after building cfg
29 # CHECK: Parent : bar/1(*2)
31 # CHECK: Binary Function "baz.cold.1" after building cfg
32 # CHECK: Parent : baz{{$}}
34 # CHECK: Binary Function "baz.cold.1/1(*2)" after building cfg
35 # CHECK: Parent : baz/1(*2)
37 # CHECK: Binary Function "baz.cold.1/2(*2)" after building cfg
38 # CHECK: Parent : baz/2(*2)
46 # FDATA: 0 [unknown] 0 1 main 0 1 0
57 # FDATA: 0 [unknown] 0 1 foo 0 1 0
68 # FDATA: 0 [unknown] 0 1 bar/1 0 1 0
79 # FDATA: 0 [unknown] 0 1 baz 0 1 0
88 .type main.cold.1, %function
97 .size main.cold.1, .-main.cold.1
100 .type foo.cold.1, %function
109 .size foo.cold.1, .-foo.cold.1
112 .type bar.cold.1, %function
121 .size bar.cold.1, .-bar.cold.1
124 .type baz.cold.1, %function
133 .size baz.cold.1, .-baz.cold.1
141 # FDATA: 0 [unknown] 0 1 baz/1 0 1 0
150 .type baz.cold.1, %function
159 .size baz.cold.1, .-baz.cold.1
167 # FDATA: 0 [unknown] 0 1 baz/2 0 1 0
176 .type baz.cold.1, %function
185 .size baz.cold.1, .-baz.cold.1