brintos

brintos / llvm-project-archived public Read only

0
0
Text · 813 B · 702fa62 Raw
34 lines · plain
1; RUN: opt < %s -passes='require<profile-summary>,cgscc(inline)' -S | FileCheck %s2 3; This tests that the function count of a callee gets correctly updated after it4; has been inlined into a two callsites.5 6; CHECK: @callee() !prof [[COUNT:![0-9]+]]7define i32 @callee() !prof !1 {8  ret i32 09}10 11define i32 @caller1() !prof !2 {12; CHECK-LABEL: @caller113; CHECK-NOT: callee14; CHECK: ret15  %i = call i32 @callee()16  ret i32 %i17}18 19define i32 @caller2() !prof !3 {20; CHECK-LABEL: @caller221; CHECK-NOT: callee22; CHECK: ret23  %i = call i32 @callee()24  ret i32 %i25}26 27!llvm.module.flags = !{!0}28; CHECK: [[COUNT]] = !{!"function_entry_count", i64 0}29!0 = !{i32 1, !"MaxFunctionCount", i32 1000}30!1 = !{!"function_entry_count", i64 1000}31!2 = !{!"function_entry_count", i64 600}32!3 = !{!"function_entry_count", i64 400}33 34