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 \
8 ; CHECK: foo inlined into bar with (cost=always): always inline attribute (hotness: 30)
9 ; CHECK: foz not inlined into bar because it should never be inlined (cost=never): noinline function attribute (hotness: 30)
11 ; Function Attrs: alwaysinline nounwind uwtable
12 define i32 @foo() #0 !prof !1 {
17 ; Function Attrs: noinline nounwind uwtable
18 define i32 @foz() #1 !prof !2 {
23 ; Function Attrs: nounwind uwtable
24 define i32 @bar() !prof !3 {
26 %call = call i32 @foo()
27 %call2 = call i32 @foz()
28 %mul = mul i32 %call, %call2
32 attributes #0 = { alwaysinline }
33 attributes #1 = { noinline }
37 !0 = !{!"clang version 3.5.0 "}
38 !1 = !{!"function_entry_count", i64 10}
39 !2 = !{!"function_entry_count", i64 20}
40 !3 = !{!"function_entry_count", i64 30}