; Test default llvm-profgen with preinline off ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/inline-cs-noprobe.perfscript --binary=%S/Inputs/inline-cs-noprobe.perfbin --csspgo-preinliner=0 --gen-cs-nested-profile=0 --output=%t1 ; Test llvm-profgen with preinliner on will merge not inlinable profile into base profile. ; RUN: llvm-profgen --format=text --llvm-sample-profile=%t1 --binary=%S/Inputs/inline-cs-noprobe.perfbin --csspgo-preinliner=1 --gen-cs-nested-profile=0 --sample-profile-hot-inline-threshold=3000 --sample-profile-cold-inline-threshold=45 --output=%t2 ; RUN: FileCheck %s --input-file %t2 --check-prefix=CHECK-PREINL ; Test default llvm-profgen with preinline off ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/inline-cs-pseudoprobe.perfscript --binary=%S/Inputs/inline-cs-pseudoprobe.perfbin --csspgo-preinliner=0 --gen-cs-nested-profile=0 --output=%t3 ; Test llvm-profgen with preinliner on will merge not inlinable profile into base profile. ; RUN: llvm-profgen --format=text --llvm-sample-profile=%t3 --binary=%S/Inputs/inline-cs-pseudoprobe.perfbin --csspgo-preinliner=1 --gen-cs-nested-profile=0 --sample-profile-hot-inline-threshold=3000 --sample-profile-cold-inline-threshold=45 --output=%t4 ; RUN: FileCheck %s --input-file %t4 --check-prefix=CHECK-PREINL-PROBE ; CHECK-PREINL: [foo]:309:0 ; CHECK-PREINL-NEXT: 2.1: 14 ; CHECK-PREINL-NEXT: 3: 15 ; CHECK-PREINL-NEXT: 3.1: 14 bar:14 ; CHECK-PREINL-NEXT: 3.2: 1 ; CHECK-PREINL-NEXT: 65526: 14 ; CHECK-PREINL-NEXT: !Attributes: 1 ; CHECK-PREINL-NEXT:[foo:3.1 @ bar]:84:0 ; CHECK-PREINL-NEXT: 1: 14 ; CHECK-PREINL-NEXT: !Attributes: 3 ; CHECK-PREINL-PROBE: [foo]:74:0 ; CHECK-PREINL-PROBE-NEXT: 1: 0 ; CHECK-PREINL-PROBE-NEXT: 2: 15 ; CHECK-PREINL-PROBE-NEXT: 3: 15 ; CHECK-PREINL-PROBE-NEXT: 4: 14 ; CHECK-PREINL-PROBE-NEXT: 5: 1 ; CHECK-PREINL-PROBE-NEXT: 6: 15 ; CHECK-PREINL-PROBE-NEXT: 7: 0 ; CHECK-PREINL-PROBE-NEXT: 8: 14 bar:14 ; CHECK-PREINL-PROBE-NEXT: 9: 0 ; CHECK-PREINL-PROBE-NEXT: !CFGChecksum: 563088904013236 ; CHECK-PREINL-PROBE-NEXT: !Attributes: 1 ; CHECK-PREINL-PROBE-NEXT:[foo:8 @ bar]:28:14 ; CHECK-PREINL-PROBE-NEXT: 1: 14 ; CHECK-PREINL-PROBE-NEXT: 4: 14 ; CHECK-PREINL-PROBE-NEXT: !CFGChecksum: 72617220756 ; CHECK-PREINL-PROBE-NEXT: !Attributes: 3