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 '
29 ; YAML-NEXT: - String: '(cost='
30 ; YAML-NEXT: - Cost: '-15000'
31 ; YAML-NEXT: - String: ', threshold='
32 ; YAML-NEXT: - Threshold: '337'
33 ; YAML-NEXT: - String: ')'
36 ; CHECK: tinkywinky inlined into main with (cost=-15000, threshold=337) (hotness: 300)
38 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
39 target triple = "x86_64-scei-ps4"
41 declare i32 @patatino()
43 define i32 @tinkywinky() {
44 %a = call i32 @patatino()
48 define i32 @main() !prof !0 {
49 %i = call i32 @tinkywinky()
53 !0 = !{!"function_entry_count", i64 300}