[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / test / ThinLTO / X86 / diagnostic-handler-remarks-with-hotness.ll
blob937b825c80b5a28fe839c7719fc474ee90aca510
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
14 ; CHECK-NOT: remark:
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
20 ; YAML1:      --- !Passed
21 ; YAML1-NEXT: Pass:            inline
22 ; YAML1-NEXT: Name:            Inlined
23 ; YAML1-NEXT: Function:        main
24 ; YAML1-NEXT: Hotness:         50
25 ; YAML1-NEXT: Args:
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:          ')'
37 ; YAML1-NEXT: ...
40 ; Verify that bar is imported 'and' inlined into 'foo'
41 ; RUN: cat %t.yaml.thin.1.yaml | FileCheck %s -check-prefix=YAML2
42 ; YAML2:      --- !Passed
43 ; YAML2-NEXT: Pass:            inline
44 ; YAML2-NEXT: Name:            Inlined
45 ; YAML2-NEXT: Function:        foo
46 ; YAML2-NEXT: Args:
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:          ')'
58 ; YAML2-NEXT: ...
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"
64 define i32 @bar() {
65         ret i32 42
67 declare i32 @foo()
68 define i32 @main() !prof !0 {
69   %i = call i32 @foo()
70   ret i32 %i
73 !0 = !{!"function_entry_count", i64 50}