1Some very basic tests for the multiple input cases. 2 3RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t 4RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 5RUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t 6RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3 7FOO3: foo: 8FOO3: Counters: 3 9FOO3: Function count: 8 10FOO3: Block counts: [7, 6] 11FOO3: Total functions: 1 12FOO3: Maximum function count: 8 13FOO3: Maximum internal block count: 7 14 15RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t 16RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY 17FOO3EMPTY: foo: 18FOO3EMPTY: Counters: 3 19FOO3EMPTY: Function count: 1 20FOO3EMPTY: Block counts: [2, 3] 21FOO3EMPTY: Total functions: 1 22FOO3EMPTY: Maximum function count: 1 23FOO3EMPTY: Maximum internal block count: 3 24 25RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t 26RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3 --check-prefix=FOO3FOO3BAR3-1 27RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3 --check-prefix=FOO3FOO3BAR3-2 28FOO3FOO3BAR3-1: foo: 29FOO3FOO3BAR3-1: Counters: 3 30FOO3FOO3BAR3-1: Function count: 3 31FOO3FOO3BAR3-1: Block counts: [5, 8] 32FOO3FOO3BAR3-2: bar: 33FOO3FOO3BAR3-2: Counters: 3 34FOO3FOO3BAR3-2: Function count: 7 35FOO3FOO3BAR3-2: Block counts: [11, 13] 36FOO3FOO3BAR3: Total functions: 2 37FOO3FOO3BAR3: Maximum function count: 7 38FOO3FOO3BAR3: Maximum internal block count: 13 39 40RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t 41RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT --check-prefix=DISJOINT-1 42RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT --check-prefix=DISJOINT-2 43DISJOINT-1: foo: 44DISJOINT-1: Counters: 3 45DISJOINT-1: Function count: 1 46DISJOINT-1: Block counts: [2, 3] 47DISJOINT-2: bar: 48DISJOINT-2: Counters: 3 49DISJOINT-2: Function count: 1 50DISJOINT-2: Block counts: [2, 3] 51DISJOINT: Total functions: 2 52DISJOINT: Maximum function count: 1 53DISJOINT: Maximum internal block count: 3 54 55RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 56RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 57RUN: -num-threads 2 -o %t 58RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 59RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 60RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 61RUN: -j 3 -o %t 62RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO4 63FOO4: foo: 64FOO4: Counters: 3 65FOO4: Function count: 4 66FOO4: Block counts: [8, 12] 67FOO4: Total functions: 1 68FOO4: Maximum function count: 4 69FOO4: Maximum internal block count: 12 70 71RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 72RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 73RUN: %p/Inputs/foo3-1.proftext -j 2 -o %t 74RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 75RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 76RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 77RUN: %p/Inputs/foo3-1.proftext -j 3 -o %t 78RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 79RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 80RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 81RUN: %p/Inputs/foo3-1.proftext -o %t 82RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 83RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 84RUN: %p/Inputs/foo3-1.proftext %p/Inputs/foo3-1.proftext \ 85RUN: %p/Inputs/foo3-1.proftext -j 1 -o %t 86RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO5 87FOO5: foo: 88FOO5: Counters: 3 89FOO5: Function count: 5 90FOO5: Block counts: [10, 15] 91FOO5: Total functions: 1 92FOO5: Maximum function count: 5 93FOO5: Maximum internal block count: 15 94