2 ; Test default using size of profile as a proxy
3 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-preinline-cost.perfscript --binary=%S/Inputs/cs-preinline-cost.perfbin --csspgo-preinliner --debug-only=cs-preinliner --output=/dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT
5 ; Test use-context-cost-for-preinliner using inlinee's byte size as context-sensitive inline cost
6 ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-preinline-cost.perfscript --binary=%S/Inputs/cs-preinline-cost.perfbin --csspgo-preinliner --debug-only=cs-preinliner --use-context-cost-for-preinliner --output=/dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-CSCOST
8 CHECK-DEFAULT: Process main for context-sensitive pre-inlining (pre-inline size: 9, size limit: 108)
9 CHECK-DEFAULT-NEXT: Inlined context profile for: main:9 @ _Z3fooi (callee size: 2, call count:545)
10 CHECK-DEFAULT-NEXT: Inlined context profile for: main:7 @ _Z3fooi (callee size: 14, call count:545)
11 CHECK-DEFAULT-NEXT: Inlined context profile for: main:8 @ _Z3fooi (callee size: 4, call count:544)
13 CHECK-CSCOST: Process main for context-sensitive pre-inlining (pre-inline size: 69, size limit: 828)
14 CHECK-CSCOST-NEXT: Inlined context profile for: main:9 @ _Z3fooi (callee size: 264, call count:545)
15 CHECK-CSCOST-NEXT: Inlined context profile for: main:7 @ _Z3fooi (callee size: 279, call count:545)
16 CHECK-CSCOST-NEXT: Inlined context profile for: main:8 @ _Z3fooi (callee size: 44, call count:544)
18 ; binary is built with the source below using the following command line:
19 ; clang -O3 -g -fpseudo-probe-for-profiling -fexperimental-new-pass-manager test.cpp
23 ;volatile int state = 9000;
36 ; while (state > 5000) {
37 ; for (int i = 50; i >= 0; i--) {
45 ; while (state < 5000) {
46 ; for (int i = 50; i >= 0; i--) {
57 ;volatile int cnt = 10000000;//10000000;
60 ; for (int i = 0; i < cnt; i++) {