blob: 2469570c26b30f0397bb7d5fbf318894bf4b2a8f [file] [log] [blame]
Davide Italiano6cb6f992017-02-12 05:05:35 +00001; RUN: llvm-as < %s >%t.bc
2
3; RUN: rm -f %t.yaml
Peter Collingbourne7faa60c2017-04-11 18:12:00 +00004; RUN: llvm-lto2 run -pass-remarks-output=%t.yaml \
Davide Italiano6cb6f992017-02-12 05:05:35 +00005; RUN: -pass-remarks-with-hotness \
6; RUN: -r %t.bc,tinkywinky,p \
7; RUN: -r %t.bc,patatino,px \
8; RUN: -r %t.bc,main,px -o %t.o %t.bc
9; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML
10
11; YAML: --- !Passed
12; YAML-NEXT: Pass: inline
13; YAML-NEXT: Name: Inlined
14; YAML-NEXT: Function: main
15; YAML-NEXT: Hotness: 300
16; YAML-NEXT: Args:
17; YAML-NEXT: - Callee: tinkywinky
18; YAML-NEXT: - String: ' inlined into '
19; YAML-NEXT: - Caller: main
20; YAML-NEXT: ...
21
22target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23target triple = "x86_64-scei-ps4"
24
25declare i32 @patatino()
26
27define i32 @tinkywinky() {
28 %a = call i32 @patatino()
29 ret i32 %a
30}
31
32define i32 @main() !prof !0 {
33 %i = call i32 @tinkywinky()
34 ret i32 %i
35}
36
37!0 = !{!"function_entry_count", i64 300}