1 ; RUN: opt -module-summary %s -o %t1.bc
2 ; RUN: opt -module-summary %p/Inputs/diagnostic-handler-remarks.ll -o %t2.bc
4 ; Check that the hotness attribute is included in the optimization record file
5 ; with -lto-pass-remarks-with-hotness.
7 ; RUN: llvm-lto -thinlto-action=run \
8 ; RUN: -use-new-pm=false \
9 ; RUN: -lto-pass-remarks-output=%t.yaml \
10 ; RUN: -lto-pass-remarks-with-hotness \
11 ; RUN: -exported-symbol _func2 \
12 ; RUN: -exported-symbol _main %t1.bc %t2.bc 2>&1 | \
13 ; RUN: FileCheck %s -allow-empty
15 ; CHECK-NOT: llvm-lto:
18 ; Verify that bar is imported 'and' inlined into 'foo'
19 ; RUN: cat %t.yaml.thin.0.yaml | FileCheck %s -check-prefix=YAML1
21 ; YAML1-NEXT: Pass: inline
22 ; YAML1-NEXT: Name: Inlined
23 ; YAML1-NEXT: Function: main
24 ; YAML1-NEXT: Hotness: 50
26 ; YAML1-NEXT: - String: ''''
27 ; YAML1-NEXT: - Callee: foo
28 ; YAML1-NEXT: - String: ''' inlined into '
29 ; YAML1-NEXT: - Caller: main
30 ; YAML1-NEXT: - String: ''''
31 ; YAML1-NEXT: - String: ' with '
32 ; YAML1-NEXT: - String: '(cost='
33 ; YAML1-NEXT: - Cost: '-30'
34 ; YAML1-NEXT: - String: ', threshold='
35 ; YAML1-NEXT: - Threshold: '337'
36 ; YAML1-NEXT: - String: ')'
40 ; Verify that bar is imported 'and' inlined into 'foo'
41 ; RUN: cat %t.yaml.thin.1.yaml | FileCheck %s -check-prefix=YAML2
43 ; YAML2-NEXT: Pass: inline
44 ; YAML2-NEXT: Name: Inlined
45 ; YAML2-NEXT: Function: foo
47 ; YAML2-NEXT: - String: ''''
48 ; YAML2-NEXT: - Callee: bar
49 ; YAML2-NEXT: - String: ''' inlined into '
50 ; YAML2-NEXT: - Caller: foo
51 ; YAML2-NEXT: - String: ''''
52 ; YAML2-NEXT: - String: ' with '
53 ; YAML2-NEXT: - String: '(cost='
54 ; YAML2-NEXT: - Cost: '-30'
55 ; YAML2-NEXT: - String: ', threshold='
56 ; YAML2-NEXT: - Threshold: '337'
57 ; YAML2-NEXT: - String: ')'
61 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
62 target triple = "x86_64-apple-macosx10.11.0"
68 define i32 @main() !prof !0 {
73 !0 = !{!"function_entry_count", i64 50}