xref: /llvm-project/llvm/test/Transforms/FunctionImport/Inputs/hotness_based_import.ll (revision 7b1d793713cf9ed9ab719f33b332f9c66a1fc5cc)
1; ModuleID = 'thinlto-function-summary-callgraph-profile-summary2.ll'
2target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
3target triple = "x86_64-unknown-linux-gnu"
4
5
6define void @hot1() #1 {
7  ret void
8}
9define void @hot2() #1 !prof !20  {
10  call void @calledFromHot()
11  call void @calledFromHot()
12  ret void
13}
14define void @hot3() #1 !prof !20 {
15  call void @calledFromHot()
16  call void @calledFromHot()
17  call void @calledFromHot()
18  ret void
19}
20define void @cold() #1 !prof !0 {
21  ret void
22}
23define void @cold2() #1 !prof !0  {
24  call void @calledFromCold()
25  call void @calledFromCold()
26  ret void
27}
28
29define void @none1() #1 {
30  ret void
31}
32
33define void @none2() #1 {
34  call void @calledFromNone()
35  ret void
36}
37define void @none3() #1 {
38  call void @calledFromNone()
39  call void @calledFromNone()
40  ret void
41}
42
43define void @calledFromCold() {
44  ret void
45}
46
47define void @calledFromHot() !prof !20 {
48  call void @calledFromHot2()
49  ret void
50}
51
52define void @calledFromHot2() !prof !20 {
53  call void @calledFromHot3()
54  ret void
55}
56
57define void @calledFromNone() !prof !0 {
58  ret void
59}
60
61declare void @calledFromHot3()
62
63!0 = !{!"function_entry_count", i64 1}
64!20 = !{!"function_entry_count", i64 110}
65
66!llvm.module.flags = !{!1}
67
68!1 = !{i32 1, !"ProfileSummary", !2}
69!2 = !{!3, !4, !5, !6, !7, !8, !9, !10}
70!3 = !{!"ProfileFormat", !"InstrProf"}
71!4 = !{!"TotalCount", i64 10000}
72!5 = !{!"MaxCount", i64 10}
73!6 = !{!"MaxInternalCount", i64 1}
74!7 = !{!"MaxFunctionCount", i64 1000}
75!8 = !{!"NumCounts", i64 3}
76!9 = !{!"NumFunctions", i64 3}
77!10 = !{!"DetailedSummary", !11}
78!11 = !{!12, !13, !14}
79!12 = !{i32 10000, i64 100, i32 1}
80!13 = !{i32 999000, i64 100, i32 1}
81!14 = !{i32 999999, i64 1, i32 2}