cgprofile-txt.s
4.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: ld.lld -e A %t -o %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s --check-prefix=NOSORT
# RUN: echo "A B 10" > %t.call_graph
# RUN: echo "A B 10" >> %t.call_graph
# RUN: echo "Aa B 80" >> %t.call_graph
# RUN: echo "A C 40" >> %t.call_graph
# RUN: echo "B C 30" >> %t.call_graph
# RUN: echo "C D 90" >> %t.call_graph
# RUN: echo "PP TS 100" >> %t.call_graph
# RUN: echo "_init2 _init 24567837" >> %t.call_graph
# RUN: echo "TS QC 9001" >> %t.call_graph
# RUN: echo "TooManyPreds0 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds1 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds2 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds3 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds4 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds5 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds6 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds7 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds8 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds9 TooManyPreds 10" >> %t.call_graph
# RUN: echo "TooManyPreds10 TooManyPreds 11" >> %t.call_graph
# RUN: ld.lld -e A %t --call-graph-ordering-file %t.call_graph -o %t2
# RUN: llvm-readobj --symbols %t2 | FileCheck %s
.section .text.D,"ax",@progbits
D:
retq
.section .text.C,"ax",@progbits
.globl C
C:
retq
.section .text.B,"ax",@progbits
.globl B
B:
retq
.section .text.A,"ax",@progbits
.globl A
A:
Aa:
retq
.section .ponies,"ax",@progbits,unique,1
.globl TS
TS:
retq
.section .ponies,"ax",@progbits,unique,2
.globl PP
PP:
retq
.section .other,"ax",@progbits,unique,1
.globl QC
QC:
retq
.section .other,"ax",@progbits,unique,2
.globl GB
GB:
retq
.section .init,"ax",@progbits,unique,1
.globl _init
_init:
retq
.section .init,"ax",@progbits,unique,2
.globl _init2
_init2:
retq
.section .text.TooManyPreds,"ax",@progbits
TooManyPreds:
retq
retq
retq
retq
retq
retq
retq
retq
retq
retq
.section .text.TooManyPreds0,"ax",@progbits
TooManyPreds0:
retq
.section .text.TooManyPreds1,"ax",@progbits
TooManyPreds1:
retq
.section .text.TooManyPreds2,"ax",@progbits
TooManyPreds2:
retq
.section .text.TooManyPreds3,"ax",@progbits
TooManyPreds3:
retq
.section .text.TooManyPreds4,"ax",@progbits
TooManyPreds4:
retq
.section .text.TooManyPreds5,"ax",@progbits
TooManyPreds5:
retq
.section .text.TooManyPreds6,"ax",@progbits
TooManyPreds6:
retq
.section .text.TooManyPreds7,"ax",@progbits
TooManyPreds7:
retq
.section .text.TooManyPreds8,"ax",@progbits
TooManyPreds8:
retq
.section .text.TooManyPreds9,"ax",@progbits
TooManyPreds9:
retq
.section .text.TooManyPreds10,"ax",@progbits
TooManyPreds10:
retq
# CHECK: Name: D
# CHECK-NEXT: Value: 0x201123
# CHECK: Name: TooManyPreds
# CHECK-NEXT: Value: 0x201124
# CHECK: Name: TooManyPreds10
# CHECK-NEXT: Value: 0x201138
# CHECK: Name: A
# CHECK-NEXT: Value: 0x201120
# CHECK: Name: B
# CHECK-NEXT: Value: 0x201121
# CHECK: Name: C
# CHECK-NEXT: Value: 0x201122
# CHECK: Name: GB
# CHECK-NEXT: Value: 0x20113F
# CHECK: Name: PP
# CHECK-NEXT: Value: 0x20113C
# CHECK: Name: QC
# CHECK-NEXT: Value: 0x20113E
# CHECK: Name: TS
# CHECK-NEXT: Value: 0x20113D
# CHECK: Name: _init
# CHECK-NEXT: Value: 0x201140
# CHECK: Name: _init2
# CHECK-NEXT: Value: 0x201141
# NOSORT: Name: D
# NOSORT-NEXT: Value: 0x201120
# NOSORT: Name: TooManyPreds
# NOSORT-NEXT: Value: 0x201124
# NOSORT: Name: TooManyPreds10
# NOSORT-NEXT: Value: 0x201138
# NOSORT: Name: A
# NOSORT-NEXT: Value: 0x201123
# NOSORT: Name: B
# NOSORT-NEXT: Value: 0x201122
# NOSORT: Name: C
# NOSORT-NEXT: Value: 0x201121
# NOSORT: Name: GB
# NOSORT-NEXT: Value: 0x20113C
# NOSORT: Name: PP
# NOSORT-NEXT: Value: 0x20113A
# NOSORT: Name: QC
# NOSORT-NEXT: Value: 0x20113B
# NOSORT: Name: TS
# NOSORT-NEXT: Value: 0x201139
# NOSORT: Name: _init
# NOSORT-NEXT: Value: 0x20113D
# NOSORT: Name: _init2
# NOSORT-NEXT: Value: 0x20113E