1 ; RUN: opt < %s -inline -pass-remarks=inline -pass-remarks-missed=inline \
2 ; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \
4 ; RUN: opt < %s -passes=inline -pass-remarks=inline -pass-remarks-missed=inline \
5 ; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \
7 ; RUN: opt < %s -passes=inliner-wrapper-no-mandatory-first -pass-remarks=inline -pass-remarks-missed=inline \
8 ; RUN: -pass-remarks-analysis=inline -pass-remarks-with-hotness -S 2>&1 \
11 ; CHECK: 'foo' inlined into 'bar' with (cost=always): always inline attribute (hotness: 30)
12 ; CHECK: 'foz' not inlined into 'bar' because it should never be inlined (cost=never): noinline function attribute (hotness: 30)
14 ; Function Attrs: alwaysinline nounwind uwtable
15 define i32 @foo() #0 !prof !1 {
20 ; Function Attrs: noinline nounwind uwtable
21 define i32 @foz() #1 !prof !2 {
26 ; Function Attrs: nounwind uwtable
27 define i32 @bar() !prof !3 {
29 %call = call i32 @foo()
30 %call2 = call i32 @foz()
31 %mul = mul i32 %call, %call2
35 attributes #0 = { alwaysinline }
36 attributes #1 = { noinline }
40 !0 = !{!"clang version 3.5.0 "}
41 !1 = !{!"function_entry_count", i64 10}
42 !2 = !{!"function_entry_count", i64 20}
43 !3 = !{!"function_entry_count", i64 30}