1; Test CSGen pass in CSPGO. 2; RUN: llvm-profdata merge %S/Inputs/cspgo-noncs.proftext -o %t-noncs.profdata 3; RUN: llvm-profdata merge %S/Inputs/cspgo-cs.proftext -o %t-cs.profdata 4; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENDEFAULT 5; RUN: opt -debug-pass-manager -passes='thinlto-pre-link<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENPRELINK 6; RUN: opt -debug-pass-manager -passes='thinlto<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENLTO 7; RUN: opt -debug-pass-manager -passes='lto-pre-link<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENPRELINK 8; RUN: opt -debug-pass-manager -passes='lto<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-gen-pipeline -cs-profilegen-file=alloc %s 2>&1 |FileCheck %s --check-prefixes=CSGENLTO 9; CSGENDEFAULT: Running pass: PGOInstrumentationUse 10; CSGENDEFAULT: Running pass: PGOInstrumentationGenCreateVar 11; CSGENDEFAULT: Running pass: PGOInstrumentationGen 12; CSGENPRELINK: Running pass: PGOInstrumentationUse 13; CSGENPRELINK: Running pass: PGOInstrumentationGenCreateVar 14; CSGENPRELINK-NOT: Running pass: PGOInstrumentationGen 15; CSGENLTO-NOT: Running pass: PGOInstrumentationUse 16; CSGENLTO-NOT: Running pass: PGOInstrumentationGenCreateVar 17; CSGENLTO: Running pass: PGOInstrumentationGen 18 19; Test CSUse pass in CSPGO. 20; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-cs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSEDEFAULT 21; RUN: opt -debug-pass-manager -passes='thinlto-pre-link<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-cs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSEPRELINK 22; RUN: opt -debug-pass-manager -passes='thinlto<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-cs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSELTO 23; RUN: opt -debug-pass-manager -passes='lto-pre-link<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-noncs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSEPRELINK 24; RUN: opt -debug-pass-manager -passes='lto<O2>' -pgo-kind=pgo-instr-use-pipeline -profile-file='%t-cs.profdata' -cspgo-kind=cspgo-instr-use-pipeline %s 2>&1 |FileCheck %s --check-prefixes=CSUSELTO 25; CSUSEDEFAULT: Running pass: PGOInstrumentationUse 26; CSUSEDEFAULT-NOT: Running pass: PGOInstrumentationGenCreateVar 27; CSUSEDEFAULT: Running pass: PGOInstrumentationUse 28; CSUSEPRELINK: Running pass: PGOInstrumentationUse 29; CSUSEPRELINK-NOT: Running pass: PGOInstrumentationGenCreateVar 30; CSUSEPRELINK-NOT: Running pass: PGOInstrumentationUse 31; CSUSELTO: Running pass: PGOInstrumentationUse 32; CSUSELTO-NOT: Running pass: PGOInstrumentationUse 33