1 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3-2.profdata -o %t 2 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 3 RUN: llvm-profdata merge %p/Inputs/foo3-2.profdata %p/Inputs/foo3-1.profdata -o %t 4 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 5 FOO3: foo: 6 FOO3: Counters: 3 7 FOO3: Function count: 8 8 FOO3: Block counts: [7, 6] 9 FOO3: Total functions: 1 10 FOO3: Maximum function count: 8 11 FOO3: Maximum internal block count: 7 12 13 RUN: llvm-profdata merge %p/Inputs/foo4-1.profdata %p/Inputs/foo4-2.profdata -o %t 14 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 15 RUN: llvm-profdata merge %p/Inputs/foo4-2.profdata %p/Inputs/foo4-1.profdata -o %t 16 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 17 FOO4: foo: 18 FOO4: Counters: 4 19 FOO4: Function count: 18 20 FOO4: Block counts: [28, 38, 48] 21 FOO4: Total functions: 1 22 FOO4: Maximum function count: 18 23 FOO4: Maximum internal block count: 48 24 25 RUN: llvm-profdata merge %p/Inputs/foo3bar3-1.profdata %p/Inputs/foo3bar3-2.profdata -o %t 26 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3 27 RUN: llvm-profdata merge %p/Inputs/foo3bar3-2.profdata %p/Inputs/foo3bar3-1.profdata -o %t 28 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3BAR3 29 FOO3BAR3: foo: 30 FOO3BAR3: Counters: 3 31 FOO3BAR3: Function count: 19 32 FOO3BAR3: Block counts: [22, 28] 33 FOO3BAR3: bar: 34 FOO3BAR3: Counters: 3 35 FOO3BAR3: Function count: 36 36 FOO3BAR3: Block counts: [42, 50] 37 FOO3BAR3: Total functions: 2 38 FOO3BAR3: Maximum function count: 36 39 FOO3BAR3: Maximum internal block count: 50 40 41 RUN: llvm-profdata merge %p/Inputs/empty.profdata %p/Inputs/foo3-1.profdata -o %t 42 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY 43 FOO3EMPTY: foo: 44 FOO3EMPTY: Counters: 3 45 FOO3EMPTY: Function count: 1 46 FOO3EMPTY: Block counts: [2, 3] 47 FOO3EMPTY: Total functions: 1 48 FOO3EMPTY: Maximum function count: 1 49 FOO3EMPTY: Maximum internal block count: 3 50 51 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/foo3bar3-1.profdata -o %t 52 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3 53 FOO3FOO3BAR3: foo: 54 FOO3FOO3BAR3: Counters: 3 55 FOO3FOO3BAR3: Function count: 3 56 FOO3FOO3BAR3: Block counts: [5, 8] 57 FOO3FOO3BAR3: bar: 58 FOO3FOO3BAR3: Counters: 3 59 FOO3FOO3BAR3: Function count: 7 60 FOO3FOO3BAR3: Block counts: [11, 13] 61 FOO3FOO3BAR3: Total functions: 2 62 FOO3FOO3BAR3: Maximum function count: 7 63 FOO3FOO3BAR3: Maximum internal block count: 13 64 65 RUN: llvm-profdata merge %p/Inputs/foo3-1.profdata %p/Inputs/bar3-1.profdata -o %t 66 RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT 67 DISJOINT: foo: 68 DISJOINT: Counters: 3 69 DISJOINT: Function count: 1 70 DISJOINT: Block counts: [2, 3] 71 DISJOINT: bar: 72 DISJOINT: Counters: 3 73 DISJOINT: Function count: 1 74 DISJOINT: Block counts: [2, 3] 75 DISJOINT: Total functions: 2 76 DISJOINT: Maximum function count: 1 77 DISJOINT: Maximum internal block count: 3 78