1 ; Test default llvm-profgen with preinline off
2 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/inline-cs-noprobe.perfscript --binary=%S/Inputs/inline-cs-noprobe.perfbin --output=%t
3 ; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-DEFAULT
5 ; Test llvm-profgen with preinliner on will merge not inlinable profile into base profile.
6 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/inline-cs-noprobe.perfscript --binary=%S/Inputs/inline-cs-noprobe.perfbin --output=%t --csspgo-preinliner=1
7 ; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-PREINL
9 ; Test preinliner threshold that prevents all possible inlining and merges everything into base profile.
10 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/inline-cs-noprobe.perfscript --binary=%S/Inputs/inline-cs-noprobe.perfbin --output=%t --csspgo-preinliner=1 -sample-profile-cold-inline-threshold=0
11 ; RUN: FileCheck %s --input-file %t --check-prefix=CHECK-NO-PREINL
13 ; CHECK-DEFAULT: [main:1 @ foo]:309:0
14 ; CHECK-DEFAULT-NEXT: 2.1: 14
15 ; CHECK-DEFAULT-NEXT: 3: 15
16 ; CHECK-DEFAULT-NEXT: 3.1: 14 bar:14
17 ; CHECK-DEFAULT-NEXT: 3.2: 1
18 ; CHECK-DEFAULT-NEXT: !Attributes: 1
19 ; CHECK-DEFAULT-NEXT:[main:1 @ foo:3.1 @ bar]:84:0
20 ; CHECK-DEFAULT-NEXT: 1: 14
21 ; CHECK-DEFAULT-NEXT: !Attributes: 1
23 ; CHECK-PREINL: [foo]:309:0
24 ; CHECK-PREINL-NEXT: 2.1: 14
25 ; CHECK-PREINL-NEXT: 3: 15
26 ; CHECK-PREINL-NEXT: 3.1: 14 bar:14
27 ; CHECK-PREINL-NEXT: 3.2: 1
28 ; CHECK-PREINL-NEXT: !Attributes: 1
29 ; CHECK-PREINL-NEXT:[foo:3.1 @ bar]:84:0
30 ; CHECK-PREINL-NEXT: 1: 14
31 ; CHECK-PREINL-NEXT: !Attributes: 3
33 ; CHECK-NO-PREINL: [foo]:309:0
34 ; CHECK-NO-PREINL-NEXT: 2.1: 14
35 ; CHECK-NO-PREINL-NEXT: 3: 15
36 ; CHECK-NO-PREINL-NEXT: 3.1: 14 bar:14
37 ; CHECK-NO-PREINL-NEXT: 3.2: 1
38 ; CHECK-NO-PREINL-NEXT: !Attributes: 1
39 ; CHECK-NO-PREINL-NEXT:[bar]:84:0
40 ; CHECK-NO-PREINL-NEXT: 1: 14
41 ; CHECK-NO-PREINL-NEXT: !Attributes: 1