9
9
declare void @bar ()
10
10
11
11
;.
12
- ; INSTRUMENT: @__profn_foo = private constant [3 x i8] c"foo"
13
- ; INSTRUMENT: @__profn_an_entrypoint = private constant [13 x i8] c"an_entrypoint"
14
- ; INSTRUMENT: @__profn_another_entrypoint_no_callees = private constant [29 x i8] c"another_entrypoint_no_callees"
15
- ; INSTRUMENT: @__profn_simple = private constant [6 x i8] c"simple"
16
- ; INSTRUMENT: @__profn_no_callsites = private constant [12 x i8] c"no_callsites"
17
- ; INSTRUMENT: @__profn_no_counters = private constant [11 x i8] c"no_counters"
18
- ;.
19
- ; LOWERING: @__profn_foo = private constant [3 x i8] c"foo"
20
- ; LOWERING: @__profn_an_entrypoint = private constant [13 x i8] c"an_entrypoint"
21
- ; LOWERING: @__profn_another_entrypoint_no_callees = private constant [29 x i8] c"another_entrypoint_no_callees"
22
- ; LOWERING: @__profn_simple = private constant [6 x i8] c"simple"
23
- ; LOWERING: @__profn_no_callsites = private constant [12 x i8] c"no_callsites"
24
- ; LOWERING: @__profn_no_counters = private constant [11 x i8] c"no_counters"
25
12
; LOWERING: @an_entrypoint_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
26
13
; LOWERING: @another_entrypoint_no_callees_ctx_root = global { ptr, ptr, ptr, i8 } zeroinitializer
27
14
; LOWERING: @__llvm_ctx_profile_callsite = external hidden thread_local global ptr
@@ -30,16 +17,16 @@ declare void @bar()
30
17
define void @foo (i32 %a , ptr %fct ) {
31
18
; INSTRUMENT-LABEL: define void @foo(
32
19
; INSTRUMENT-SAME: i32 [[A:%.*]], ptr [[FCT:%.*]]) {
33
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_foo , i64 728453322856651412, i32 2, i32 0)
20
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @foo , i64 728453322856651412, i32 2, i32 0)
34
21
; INSTRUMENT-NEXT: [[T:%.*]] = icmp eq i32 [[A]], 0
35
22
; INSTRUMENT-NEXT: br i1 [[T]], label [[YES:%.*]], label [[NO:%.*]]
36
23
; INSTRUMENT: yes:
37
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_foo , i64 728453322856651412, i32 2, i32 1)
38
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @__profn_foo , i64 728453322856651412, i32 2, i32 0, ptr [[FCT]])
24
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @foo , i64 728453322856651412, i32 2, i32 1)
25
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @foo , i64 728453322856651412, i32 2, i32 0, ptr [[FCT]])
39
26
; INSTRUMENT-NEXT: call void [[FCT]](i32 [[A]])
40
27
; INSTRUMENT-NEXT: br label [[EXIT:%.*]]
41
28
; INSTRUMENT: no:
42
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @__profn_foo , i64 728453322856651412, i32 2, i32 1, ptr @bar)
29
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @foo , i64 728453322856651412, i32 2, i32 1, ptr @bar)
43
30
; INSTRUMENT-NEXT: call void @bar()
44
31
; INSTRUMENT-NEXT: br label [[EXIT]]
45
32
; INSTRUMENT: exit:
@@ -92,12 +79,12 @@ exit:
92
79
define void @an_entrypoint (i32 %a ) {
93
80
; INSTRUMENT-LABEL: define void @an_entrypoint(
94
81
; INSTRUMENT-SAME: i32 [[A:%.*]]) {
95
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_an_entrypoint , i64 784007058953177093, i32 2, i32 0)
82
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @an_entrypoint , i64 784007058953177093, i32 2, i32 0)
96
83
; INSTRUMENT-NEXT: [[T:%.*]] = icmp eq i32 [[A]], 0
97
84
; INSTRUMENT-NEXT: br i1 [[T]], label [[YES:%.*]], label [[NO:%.*]]
98
85
; INSTRUMENT: yes:
99
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_an_entrypoint , i64 784007058953177093, i32 2, i32 1)
100
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @__profn_an_entrypoint , i64 784007058953177093, i32 1, i32 0, ptr @foo)
86
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @an_entrypoint , i64 784007058953177093, i32 2, i32 1)
87
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @an_entrypoint , i64 784007058953177093, i32 1, i32 0, ptr @foo)
101
88
; INSTRUMENT-NEXT: call void @foo(i32 1, ptr null)
102
89
; INSTRUMENT-NEXT: ret void
103
90
; INSTRUMENT: no:
@@ -144,11 +131,11 @@ no:
144
131
define void @another_entrypoint_no_callees (i32 %a ) {
145
132
; INSTRUMENT-LABEL: define void @another_entrypoint_no_callees(
146
133
; INSTRUMENT-SAME: i32 [[A:%.*]]) {
147
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_another_entrypoint_no_callees , i64 784007058953177093, i32 2, i32 0)
134
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @another_entrypoint_no_callees , i64 784007058953177093, i32 2, i32 0)
148
135
; INSTRUMENT-NEXT: [[T:%.*]] = icmp eq i32 [[A]], 0
149
136
; INSTRUMENT-NEXT: br i1 [[T]], label [[YES:%.*]], label [[NO:%.*]]
150
137
; INSTRUMENT: yes:
151
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_another_entrypoint_no_callees , i64 784007058953177093, i32 2, i32 1)
138
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @another_entrypoint_no_callees , i64 784007058953177093, i32 2, i32 1)
152
139
; INSTRUMENT-NEXT: ret void
153
140
; INSTRUMENT: no:
154
141
; INSTRUMENT-NEXT: ret void
184
171
define void @simple (i32 %a ) {
185
172
; INSTRUMENT-LABEL: define void @simple(
186
173
; INSTRUMENT-SAME: i32 [[A:%.*]]) {
187
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_simple , i64 742261418966908927, i32 1, i32 0)
174
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @simple , i64 742261418966908927, i32 1, i32 0)
188
175
; INSTRUMENT-NEXT: ret void
189
176
;
190
177
; LOWERING-LABEL: define void @simple(
@@ -202,11 +189,11 @@ define void @simple(i32 %a) {
202
189
define i32 @no_callsites (i32 %a ) {
203
190
; INSTRUMENT-LABEL: define i32 @no_callsites(
204
191
; INSTRUMENT-SAME: i32 [[A:%.*]]) {
205
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_no_callsites , i64 784007058953177093, i32 2, i32 0)
192
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @no_callsites , i64 784007058953177093, i32 2, i32 0)
206
193
; INSTRUMENT-NEXT: [[C:%.*]] = icmp eq i32 [[A]], 0
207
194
; INSTRUMENT-NEXT: br i1 [[C]], label [[YES:%.*]], label [[NO:%.*]]
208
195
; INSTRUMENT: yes:
209
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_no_callsites , i64 784007058953177093, i32 2, i32 1)
196
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @no_callsites , i64 784007058953177093, i32 2, i32 1)
210
197
; INSTRUMENT-NEXT: ret i32 1
211
198
; INSTRUMENT: no:
212
199
; INSTRUMENT-NEXT: ret i32 0
238
225
239
226
define void @no_counters () {
240
227
; INSTRUMENT-LABEL: define void @no_counters() {
241
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @__profn_no_counters , i64 742261418966908927, i32 1, i32 0)
242
- ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @__profn_no_counters , i64 742261418966908927, i32 1, i32 0, ptr @bar)
228
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.increment(ptr @no_counters , i64 742261418966908927, i32 1, i32 0)
229
+ ; INSTRUMENT-NEXT: call void @llvm.instrprof.callsite(ptr @no_counters , i64 742261418966908927, i32 1, i32 0, ptr @bar)
243
230
; INSTRUMENT-NEXT: call void @bar()
244
231
; INSTRUMENT-NEXT: ret void
245
232
;
0 commit comments