multiple-inputs.test 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Some very basic tests for the multiple input cases.
  2. RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3-2.proftext -o %t
  3. RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
  4. RUN: llvm-profdata merge %p/Inputs/foo3-2.proftext %p/Inputs/foo3-1.proftext -o %t
  5. RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3
  6. FOO3: foo:
  7. FOO3: Counters: 3
  8. FOO3: Function count: 8
  9. FOO3: Block counts: [7, 6]
  10. FOO3: Total functions: 1
  11. FOO3: Maximum function count: 8
  12. FOO3: Maximum internal block count: 7
  13. RUN: llvm-profdata merge %p/Inputs/empty.proftext %p/Inputs/foo3-1.proftext -o %t
  14. RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3EMPTY
  15. FOO3EMPTY: foo:
  16. FOO3EMPTY: Counters: 3
  17. FOO3EMPTY: Function count: 1
  18. FOO3EMPTY: Block counts: [2, 3]
  19. FOO3EMPTY: Total functions: 1
  20. FOO3EMPTY: Maximum function count: 1
  21. FOO3EMPTY: Maximum internal block count: 3
  22. RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/foo3bar3-1.proftext -o %t
  23. RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=FOO3FOO3BAR3
  24. FOO3FOO3BAR3: foo:
  25. FOO3FOO3BAR3: Counters: 3
  26. FOO3FOO3BAR3: Function count: 3
  27. FOO3FOO3BAR3: Block counts: [5, 8]
  28. FOO3FOO3BAR3: bar:
  29. FOO3FOO3BAR3: Counters: 3
  30. FOO3FOO3BAR3: Function count: 7
  31. FOO3FOO3BAR3: Block counts: [11, 13]
  32. FOO3FOO3BAR3: Total functions: 2
  33. FOO3FOO3BAR3: Maximum function count: 7
  34. FOO3FOO3BAR3: Maximum internal block count: 13
  35. RUN: llvm-profdata merge %p/Inputs/foo3-1.proftext %p/Inputs/bar3-1.proftext -o %t
  36. RUN: llvm-profdata show %t -all-functions -counts | FileCheck %s --check-prefix=DISJOINT
  37. DISJOINT: foo:
  38. DISJOINT: Counters: 3
  39. DISJOINT: Function count: 1
  40. DISJOINT: Block counts: [2, 3]
  41. DISJOINT: bar:
  42. DISJOINT: Counters: 3
  43. DISJOINT: Function count: 1
  44. DISJOINT: Block counts: [2, 3]
  45. DISJOINT: Total functions: 2
  46. DISJOINT: Maximum function count: 1
  47. DISJOINT: Maximum internal block count: 3