1 ; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=pgo-instr-gen-pipeline -profile-file='temp' %s 2>&1 |FileCheck %s --check-prefixes=GEN
2 ; RUN: llvm-profdata merge %S/Inputs/new-pm-pgo.proftext -o %t.profdata
3 ; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 |FileCheck %s --check-prefixes=USE
4 ; RUN: opt -debug-pass-manager -passes='thinlto-pre-link<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 |FileCheck %s --check-prefixes=USE
5 ; RUN: opt -debug-pass-manager -passes='thinlto<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 |FileCheck %s --check-prefixes=USE_POST_LINK
6 ; RUN: opt -debug-pass-manager -passes='default<O2>' -hot-cold-split -pgo-kind=pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 |FileCheck %s --check-prefixes=USE --check-prefixes=SPLIT
7 ; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-pgo.prof' %s 2>&1 \
8 ; RUN: |FileCheck %s --check-prefixes=SAMPLE_USE,SAMPLE_USE_O
9 ; RUN: opt -debug-pass-manager -passes='thinlto-pre-link<O2>' -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-pgo.prof' %s 2>&1 \
10 ; RUN: |FileCheck %s --check-prefixes=SAMPLE_USE,SAMPLE_USE_PRE_LINK
11 ; RUN: opt -debug-pass-manager -passes='thinlto<O2>' -pgo-kind=pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-pgo.prof' %s 2>&1 \
12 ; RUN: |FileCheck %s --check-prefixes=SAMPLE_USE,SAMPLE_USE_POST_LINK
13 ; RUN: opt -debug-pass-manager -passes='default<O2>' -debug-info-for-profiling %s 2>&1 |FileCheck %s --check-prefixes=SAMPLE_GEN
15 ; GEN: Running pass: PGOInstrumentationGen
16 ; USE: Running pass: PGOInstrumentationUse
17 ; USE: Running pass: PGOIndirectCallPromotion
18 ; USE: Running pass: PGOMemOPSizeOpt
19 ; USE_POST_LINK: Running pass: PGOIndirectCallPromotion
20 ; USE_POST_LINK: Running pass: PGOMemOPSizeOpt
21 ; SAMPLE_USE_O: Running pass: AddDiscriminatorsPass
22 ; SAMPLE_USE_PRE_LINK: Running pass: AddDiscriminatorsPass
23 ; SAMPLE_USE: Running pass: LowerExpectIntrinsicPass
24 ; SAMPLE_USE: Running pass: SimplifyCFGPass
25 ; SAMPLE_USE: Running pass: SROAPass
26 ; SAMPLE_USE: Running pass: EarlyCSEPass
27 ; SAMPLE_USE: Running pass: SampleProfileLoaderPass
28 ; SAMPLE_USE_O: Running pass: PGOIndirectCallPromotion
29 ; SAMPLE_USE_POST_LINK-NOT: Running pass: GlobalOptPass
30 ; SAMPLE_USE_POST_LINK: Running pass: PGOIndirectCallPromotion
31 ; SAMPLE_USE_PRE_LINK-NOT: Running pass: PGOIndirectCallPromotion
32 ; SAMPLE_GEN: Running pass: AddDiscriminatorsPass
33 ; SPLIT: Running pass: HotColdSplittingPass