aboutsummaryrefslogtreecommitdiffstats
path: root/test/tools/llvm-profdata/multiple-inputs.test
blob: 616efe92bb868600dac3c612df8446b48a9ce976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Some very basic tests for the multiple input cases.

RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
RUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
FOO3: foo:
FOO3: Counters: 3
FOO3: Function count: 8
FOO3: Block counts: [7, 6]
FOO3: Total functions: 1
FOO3: Maximum function count: 8
FOO3: Maximum internal block count: 7

RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
FOO3EMPTY: foo:
FOO3EMPTY: Counters: 3
FOO3EMPTY: Function count: 1
FOO3EMPTY: Block counts: [2, 3]
FOO3EMPTY: Total functions: 1
FOO3EMPTY: Maximum function count: 1
FOO3EMPTY: Maximum internal block count: 3

RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3
FOO3FOO3BAR3: foo:
FOO3FOO3BAR3: Counters: 3
FOO3FOO3BAR3: Function count: 3
FOO3FOO3BAR3: Block counts: [5, 8]
FOO3FOO3BAR3: bar:
FOO3FOO3BAR3: Counters: 3
FOO3FOO3BAR3: Function count: 7
FOO3FOO3BAR3: Block counts: [11, 13]
FOO3FOO3BAR3: Total functions: 2
FOO3FOO3BAR3: Maximum function count: 7
FOO3FOO3BAR3: Maximum internal block count: 13

RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t
RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT
DISJOINT: foo:
DISJOINT: Counters: 3
DISJOINT: Function count: 1
DISJOINT: Block counts: [2, 3]
DISJOINT: bar:
DISJOINT: Counters: 3
DISJOINT: Function count: 1
DISJOINT: Block counts: [2, 3]
DISJOINT: Total functions: 2
DISJOINT: Maximum function count: 1
DISJOINT: Maximum internal block count: 3