1 ; RUN: llvm-as < %s >%t.bc
3 ; Check pass remarks emitted to YAML file
5 ; RUN: llvm-lto2 run -pass-remarks-output=%t.yaml \
6 ; RUN: -pass-remarks-with-hotness \
7 ; RUN: -r %t.bc,tinkywinky,p \
8 ; RUN: -r %t.bc,patatino,px \
9 ; RUN: -r %t.bc,main,px -o %t.o %t.bc
10 ; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
12 ; Check pass remarks emitted to stderr
13 ; RUN: llvm-lto2 run -pass-remarks=inline \
14 ; RUN: -pass-remarks-with-hotness \
15 ; RUN: -r %t.bc,tinkywinky,p \
16 ; RUN: -r %t.bc,patatino,px \
17 ; RUN: -r %t.bc,main,px -o %t.o %t.bc 2>&1 | FileCheck %s
20 ; YAML-NEXT: Pass: inline
21 ; YAML-NEXT: Name: Inlined
22 ; YAML-NEXT: Function: main
23 ; YAML-NEXT: Hotness: 300
25 ; YAML-NEXT: - Callee: tinkywinky
26 ; YAML-NEXT: - String: ' inlined into '
27 ; YAML-NEXT: - Caller: main
28 ; YAML-NEXT: - String: ' with cost='
29 ; YAML-NEXT: - Cost: '-15000'
30 ; YAML-NEXT: - String: ' (threshold='
31 ; YAML-NEXT: - Threshold: '337'
32 ; YAML-NEXT: - String: ')'
35 ; CHECK: tinkywinky inlined into main with cost=-15000 (threshold=337) (hotness: 300)
37 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
38 target triple = "x86_64-scei-ps4"
40 declare i32 @patatino()
42 define i32 @tinkywinky() {
43 %a = call i32 @patatino()
47 define i32 @main() !prof !0 {
48 %i = call i32 @tinkywinky()
52 !0 = !{!"function_entry_count", i64 300}