[llvm-nm] - Fix a bug and unbreak ASan BB.
[llvm-complete.git] / test / Other / new-pm-pgo.ll
blobab9f084c38cf3f40cf46fdd28034bcb2c43380a7
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='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
5 ; 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 \
6 ; RUN:     |FileCheck %s --check-prefixes=SAMPLE_USE,SAMPLE_USE_O
7 ; 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 \
8 ; RUN:     |FileCheck %s --check-prefixes=SAMPLE_USE,SAMPLE_USE_PRE_LINK
9 ; 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 \
10 ; RUN:     |FileCheck %s --check-prefixes=SAMPLE_USE,SAMPLE_USE_POST_LINK
11 ; RUN: opt -debug-pass-manager -passes='default<O2>' -new-pm-debug-info-for-profiling %s 2>&1 |FileCheck %s --check-prefixes=SAMPLE_GEN
13 ; GEN: Running pass: PGOInstrumentationGen
14 ; USE: Running pass: PGOInstrumentationUse
15 ; USE: Running pass: PGOIndirectCallPromotion
16 ; USE: Running pass: PGOMemOPSizeOpt
17 ; SAMPLE_USE_O: Running pass: ModuleToFunctionPassAdaptor<{{.*}}AddDiscriminatorsPass{{.*}}>
18 ; SAMPLE_USE_PRE_LINK: Running pass: ModuleToFunctionPassAdaptor<{{.*}}AddDiscriminatorsPass{{.*}}>
19 ; SAMPLE_USE: Running pass: SimplifyCFGPass
20 ; SAMPLE_USE: Running pass: SROA
21 ; SAMPLE_USE: Running pass: EarlyCSEPass
22 ; SAMPLE_USE: Running pass: LowerExpectIntrinsicPass
23 ; SAMPLE_USE_POST_LINK: Running pass: InstCombinePass
24 ; SAMPLE_USE: Running pass: SampleProfileLoaderPass
25 ; SAMPLE_USE_O: Running pass: PGOIndirectCallPromotion
26 ; SAMPLE_USE_POST_LINK-NOT: Running pass: GlobalOptPass
27 ; SAMPLE_USE_POST_LINK: Running pass: PGOIndirectCallPromotion
28 ; SAMPLE_GEN: Running pass: ModuleToFunctionPassAdaptor<{{.*}}AddDiscriminatorsPass{{.*}}>
29 ; SPLIT: Running pass: HotColdSplittingPass
31 define void @foo() {
32   ret void