1 ;; Tests memprof profile matching (with and without instrumentation profiles).
3 ;; Several requirements due to using raw profile inputs:
4 ;; PGO profile uses zlib compression
6 ;; Avoid failures on big-endian systems that can't read the profile properly
7 ; REQUIRES: x86_64-linux
9 ;; TODO: Use text profile inputs once that is available for memprof.
10 ;; # To update the Inputs below, run Inputs/update_memprof_inputs.sh.
11 ;; # To generate below LLVM IR for use in matching:
12 ;; $ clang++ -gmlt -fdebug-info-for-profiling -fno-omit-frame-pointer \
13 ;; -fno-optimize-sibling-calls memprof.cc -S -emit-llvm
15 ;; Generate indexed profiles of all combinations:
16 ; RUN: llvm-profdata merge %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.memprofdata
17 ; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.proftext %S/Inputs/memprof.memprofraw --profiled-binary %S/Inputs/memprof.exe -o %t.pgomemprofdata
18 ; RUN: llvm-profdata merge %S/Inputs/memprof_pgo.proftext -o %t.pgoprofdata
19 ; RUN: llvm-profdata merge %S/Inputs/memprof.nocolinfo.memprofraw --profiled-binary %S/Inputs/memprof.nocolinfo.exe -o %t.nocolinfo.memprofdata
21 ;; In all below cases we should not get any messages about missing profile data
22 ;; for any functions. Either we are not performing any matching for a particular
23 ;; profile type or we are performing the matching and it should be successful.
24 ; ALL-NOT: memprof record not found for function hash
25 ; ALL-NOT: no profile data available for function
27 ;; Using a memprof-only profile for memprof-use should only give memprof metadata
28 ; RUN: opt < %s -passes='memprof-use<profile-filename=%t.memprofdata>' -pgo-warn-missing-function -S 2>&1 | FileCheck %s --check-prefixes=MEMPROF,ALL,MEMPROFONLY
29 ; There should not be any PGO metadata
30 ; MEMPROFONLY-NOT: !prof
32 ;; Try again but using a profile with missing columns. The memprof matcher
33 ;; should recognize that there are no non-zero columns in the profile and
34 ;; not attempt to include column numbers in the matching (which means that the
35 ;; stack ids will be different).
36 ; RUN: opt < %s -passes='memprof-use<profile-filename=%t.nocolinfo.memprofdata>' -pgo-warn-missing-function -S 2>&1 | FileCheck %s --check-prefixes=MEMPROFNOCOLINFO,ALL,MEMPROFONLY
38 ;; Test the same thing but by passing the memory profile through to a default
39 ;; pipeline via -memory-profile-file=, which should cause the necessary field
40 ;; of the PGOOptions structure to be populated with the profile filename.
41 ; RUN: opt < %s -passes='default<O2>' -memory-profile-file=%t.memprofdata -pgo-warn-missing-function -S 2>&1 | FileCheck %s --check-prefixes=MEMPROF,ALL,MEMPROFONLY
43 ;; Using a pgo+memprof profile for memprof-use should only give memprof metadata
44 ; RUN: opt < %s -passes='memprof-use<profile-filename=%t.pgomemprofdata>' -pgo-warn-missing-function -S 2>&1 | FileCheck %s --check-prefixes=MEMPROF,ALL,MEMPROFONLY
46 ;; Using a pgo-only profile for memprof-use should give an error
47 ; RUN: not opt < %s -passes='memprof-use<profile-filename=%t.pgoprofdata>' -S 2>&1 | FileCheck %s --check-prefixes=MEMPROFWITHPGOONLY
48 ; MEMPROFWITHPGOONLY: Not a memory profile
50 ;; Using a memprof-only profile for pgo-instr-use should give an error
51 ; RUN: not opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.memprofdata -S 2>&1 | FileCheck %s --check-prefixes=PGOWITHMEMPROFONLY
52 ; PGOWITHMEMPROFONLY: Not an IR level instrumentation profile
54 ;; Using a pgo+memprof profile for pgo-instr-use should only give pgo metadata
55 ; RUN: opt < %s -passes=pgo-instr-use -pgo-test-profile-file=%t.pgomemprofdata -pgo-warn-missing-function -S 2>&1 | FileCheck %s --check-prefixes=PGO,ALL,PGOONLY
56 ; There should not be any memprof related metadata
57 ; PGOONLY-NOT: !memprof
58 ; PGOONLY-NOT: !callsite
60 ;; Using a pgo+memprof profile for both memprof-use and pgo-instr-use should
61 ;; give both memprof and pgo metadata.
62 ; RUN: opt < %s -passes='pgo-instr-use,memprof-use<profile-filename=%t.pgomemprofdata>' -pgo-test-profile-file=%t.pgomemprofdata -pgo-warn-missing-function -S 2>&1 | FileCheck %s --check-prefixes=MEMPROF,ALL,PGO
64 ; ModuleID = 'memprof.cc'
65 source_filename = "memprof.cc"
66 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
67 target triple = "x86_64-unknown-linux-gnu"
69 ; Function Attrs: mustprogress noinline optnone uwtable
70 ; ALL-LABEL: define dso_local noundef ptr @_Z3foov()
71 ; There should be some PGO metadata
73 define dso_local noundef ptr @_Z3foov() #0 !dbg !10 {
75 ; MEMPROF: call {{.*}} @_Znam{{.*}} !memprof ![[M1:[0-9]+]], !callsite ![[C1:[0-9]+]]
76 ; MEMPROFNOCOLINFO: call {{.*}} @_Znam{{.*}} !memprof ![[M1:[0-9]+]], !callsite ![[C1:[0-9]+]]
77 %call = call noalias noundef nonnull ptr @_Znam(i64 noundef 10) #6, !dbg !13
78 ret ptr %call, !dbg !14
81 ; Function Attrs: nobuiltin allocsize(0)
82 declare noundef nonnull ptr @_Znam(i64 noundef) #1
84 ; Function Attrs: mustprogress noinline optnone uwtable
85 ; ALL-LABEL: define dso_local noundef ptr @_Z4foo2v()
86 define dso_local noundef ptr @_Z4foo2v() #0 !dbg !15 {
88 ; MEMPROF: call {{.*}} @_Z3foov{{.*}} !callsite ![[C2:[0-9]+]]
89 ; MEMPROFNOCOLINFO: call {{.*}} @_Z3foov{{.*}} !callsite ![[C2:[0-9]+]]
90 %call = call noundef ptr @_Z3foov(), !dbg !16
91 ret ptr %call, !dbg !17
94 ; Function Attrs: mustprogress noinline optnone uwtable
95 define dso_local noundef ptr @_Z3barv() #0 !dbg !18 {
97 ; MEMPROF: call {{.*}} @_Z4foo2v{{.*}} !callsite ![[C3:[0-9]+]]
98 ; MEMPROFNOCOLINFO: call {{.*}} @_Z4foo2v{{.*}} !callsite ![[C3:[0-9]+]]
99 %call = call noundef ptr @_Z4foo2v(), !dbg !19
100 ret ptr %call, !dbg !20
103 ; Function Attrs: mustprogress noinline optnone uwtable
104 define dso_local noundef ptr @_Z3bazv() #0 !dbg !21 {
106 ; MEMPROF: call {{.*}} @_Z4foo2v{{.*}} !callsite ![[C4:[0-9]+]]
107 ; MEMPROFNOCOLINFO: call {{.*}} @_Z4foo2v{{.*}} !callsite ![[C4:[0-9]+]]
108 %call = call noundef ptr @_Z4foo2v(), !dbg !22
109 ret ptr %call, !dbg !23
112 ; Function Attrs: mustprogress noinline optnone uwtable
113 define dso_local noundef ptr @_Z7recursej(i32 noundef %n) #0 !dbg !24 {
115 %retval = alloca ptr, align 8
116 %n.addr = alloca i32, align 4
117 store i32 %n, ptr %n.addr, align 4
118 %0 = load i32, ptr %n.addr, align 4, !dbg !25
119 %tobool = icmp ne i32 %0, 0, !dbg !25
120 br i1 %tobool, label %if.end, label %if.then, !dbg !26
122 if.then: ; preds = %entry
123 ; MEMPROF: call {{.*}} @_Z3foov{{.*}} !callsite ![[C5:[0-9]+]]
124 ; MEMPROFNOCOLINFO: call {{.*}} @_Z3foov{{.*}} !callsite ![[C5:[0-9]+]]
125 %call = call noundef ptr @_Z3foov(), !dbg !27
126 store ptr %call, ptr %retval, align 8, !dbg !28
127 br label %return, !dbg !28
129 if.end: ; preds = %entry
130 %1 = load i32, ptr %n.addr, align 4, !dbg !29
131 %sub = sub i32 %1, 1, !dbg !30
132 ; MEMPROF: call {{.*}} @_Z7recursej{{.*}} !callsite ![[C6:[0-9]+]]
133 ; MEMPROFNOCOLINFO: call {{.*}} @_Z7recursej{{.*}} !callsite ![[C6:[0-9]+]]
134 %call1 = call noundef ptr @_Z7recursej(i32 noundef %sub), !dbg !31
135 store ptr %call1, ptr %retval, align 8, !dbg !32
136 br label %return, !dbg !32
138 return: ; preds = %if.end, %if.then
139 %2 = load ptr, ptr %retval, align 8, !dbg !33
143 ; Function Attrs: mustprogress noinline norecurse optnone uwtable
144 define dso_local noundef i32 @main(i32 noundef %argc, ptr noundef %argv) #2 !dbg !34 {
146 %retval = alloca i32, align 4
147 %argc.addr = alloca i32, align 4
148 %argv.addr = alloca ptr, align 8
149 %a = alloca ptr, align 8
150 %b = alloca ptr, align 8
151 %c = alloca ptr, align 8
152 %d = alloca ptr, align 8
153 %e = alloca ptr, align 8
154 %f = alloca ptr, align 8
155 %i = alloca i32, align 4
156 %g = alloca ptr, align 8
157 store i32 0, ptr %retval, align 4
158 store i32 %argc, ptr %argc.addr, align 4
159 store ptr %argv, ptr %argv.addr, align 8
160 ; MEMPROF: call {{.*}} @_Znam{{.*}} #[[A1:[0-9]+]]
161 ; MEMPROFNOCOLINFO: call {{.*}} @_Znam{{.*}} #[[A1:[0-9]+]]
162 %call = call noalias noundef nonnull ptr @_Znam(i64 noundef 10) #6, !dbg !35
163 store ptr %call, ptr %a, align 8, !dbg !36
164 ; MEMPROF: call {{.*}} @_Znam{{.*}} #[[A2:[0-9]+]]
165 ; MEMPROFNOCOLINFO: call {{.*}} @_Znam{{.*}} #[[A2:[0-9]+]]
166 %call1 = call noalias noundef nonnull ptr @_Znam(i64 noundef 10) #6, !dbg !37
167 store ptr %call1, ptr %b, align 8, !dbg !38
168 ; MEMPROF: call {{.*}} @_Z3foov{{.*}} !callsite ![[C7:[0-9]+]]
169 ; MEMPROFNOCOLINFO: call {{.*}} @_Z3foov{{.*}} !callsite ![[C7:[0-9]+]]
170 %call2 = call noundef ptr @_Z3foov(), !dbg !39
171 store ptr %call2, ptr %c, align 8, !dbg !40
172 ; MEMPROF: call {{.*}} @_Z3foov{{.*}} !callsite ![[C8:[0-9]+]]
173 ; MEMPROFNOCOLINFO: call {{.*}} @_Z3foov{{.*}} !callsite ![[C8:[0-9]+]]
174 %call3 = call noundef ptr @_Z3foov(), !dbg !41
175 store ptr %call3, ptr %d, align 8, !dbg !42
176 ; MEMPROF: call {{.*}} @_Z3barv{{.*}} !callsite ![[C9:[0-9]+]]
177 ; MEMPROFNOCOLINFO: call {{.*}} @_Z3barv{{.*}} !callsite ![[C9:[0-9]+]]
178 %call4 = call noundef ptr @_Z3barv(), !dbg !43
179 store ptr %call4, ptr %e, align 8, !dbg !44
180 ; MEMPROF: call {{.*}} @_Z3bazv{{.*}} !callsite ![[C10:[0-9]+]]
181 ; MEMPROFNOCOLINFO: call {{.*}} @_Z3bazv{{.*}} !callsite ![[C10:[0-9]+]]
182 %call5 = call noundef ptr @_Z3bazv(), !dbg !45
183 store ptr %call5, ptr %f, align 8, !dbg !46
184 %0 = load ptr, ptr %a, align 8, !dbg !47
185 call void @llvm.memset.p0.i64(ptr align 1 %0, i8 0, i64 10, i1 false), !dbg !48
186 %1 = load ptr, ptr %b, align 8, !dbg !49
187 call void @llvm.memset.p0.i64(ptr align 1 %1, i8 0, i64 10, i1 false), !dbg !50
188 %2 = load ptr, ptr %c, align 8, !dbg !51
189 call void @llvm.memset.p0.i64(ptr align 1 %2, i8 0, i64 10, i1 false), !dbg !52
190 %3 = load ptr, ptr %d, align 8, !dbg !53
191 call void @llvm.memset.p0.i64(ptr align 1 %3, i8 0, i64 10, i1 false), !dbg !54
192 %4 = load ptr, ptr %e, align 8, !dbg !55
193 call void @llvm.memset.p0.i64(ptr align 1 %4, i8 0, i64 10, i1 false), !dbg !56
194 %5 = load ptr, ptr %f, align 8, !dbg !57
195 call void @llvm.memset.p0.i64(ptr align 1 %5, i8 0, i64 10, i1 false), !dbg !58
196 %6 = load ptr, ptr %a, align 8, !dbg !59
197 %isnull = icmp eq ptr %6, null, !dbg !60
198 br i1 %isnull, label %delete.end, label %delete.notnull, !dbg !60
200 delete.notnull: ; preds = %entry
201 call void @_ZdaPv(ptr noundef %6) #7, !dbg !61
202 br label %delete.end, !dbg !61
204 delete.end: ; preds = %delete.notnull, %entry
205 %7 = load ptr, ptr %c, align 8, !dbg !63
206 %isnull6 = icmp eq ptr %7, null, !dbg !64
207 br i1 %isnull6, label %delete.end8, label %delete.notnull7, !dbg !64
209 delete.notnull7: ; preds = %delete.end
210 call void @_ZdaPv(ptr noundef %7) #7, !dbg !65
211 br label %delete.end8, !dbg !65
213 delete.end8: ; preds = %delete.notnull7, %delete.end
214 %call9 = call i32 @sleep(i32 noundef 200), !dbg !66
215 %8 = load ptr, ptr %b, align 8, !dbg !67
216 %isnull10 = icmp eq ptr %8, null, !dbg !68
217 br i1 %isnull10, label %delete.end12, label %delete.notnull11, !dbg !68
219 delete.notnull11: ; preds = %delete.end8
220 call void @_ZdaPv(ptr noundef %8) #7, !dbg !69
221 br label %delete.end12, !dbg !69
223 delete.end12: ; preds = %delete.notnull11, %delete.end8
224 %9 = load ptr, ptr %d, align 8, !dbg !70
225 %isnull13 = icmp eq ptr %9, null, !dbg !71
226 br i1 %isnull13, label %delete.end15, label %delete.notnull14, !dbg !71
228 delete.notnull14: ; preds = %delete.end12
229 call void @_ZdaPv(ptr noundef %9) #7, !dbg !72
230 br label %delete.end15, !dbg !72
232 delete.end15: ; preds = %delete.notnull14, %delete.end12
233 %10 = load ptr, ptr %e, align 8, !dbg !73
234 %isnull16 = icmp eq ptr %10, null, !dbg !74
235 br i1 %isnull16, label %delete.end18, label %delete.notnull17, !dbg !74
237 delete.notnull17: ; preds = %delete.end15
238 call void @_ZdaPv(ptr noundef %10) #7, !dbg !75
239 br label %delete.end18, !dbg !75
241 delete.end18: ; preds = %delete.notnull17, %delete.end15
242 %11 = load ptr, ptr %f, align 8, !dbg !76
243 %isnull19 = icmp eq ptr %11, null, !dbg !77
244 br i1 %isnull19, label %delete.end21, label %delete.notnull20, !dbg !77
246 delete.notnull20: ; preds = %delete.end18
247 call void @_ZdaPv(ptr noundef %11) #7, !dbg !78
248 br label %delete.end21, !dbg !78
250 delete.end21: ; preds = %delete.notnull20, %delete.end18
251 store i32 0, ptr %i, align 4, !dbg !79
252 br label %for.cond, !dbg !80
254 for.cond: ; preds = %for.inc, %delete.end21
255 %12 = load i32, ptr %i, align 4, !dbg !81
256 %cmp = icmp ult i32 %12, 2, !dbg !82
257 br i1 %cmp, label %for.body, label %for.end, !dbg !83
259 for.body: ; preds = %for.cond
260 %13 = load i32, ptr %i, align 4, !dbg !84
261 %add = add i32 %13, 3, !dbg !85
262 ; MEMPROF: call {{.*}} @_Z7recursej{{.*}} !callsite ![[C11:[0-9]+]]
263 ; MEMPROFNOCOLINFO: call {{.*}} @_Z7recursej{{.*}} !callsite ![[C11:[0-9]+]]
264 %call22 = call noundef ptr @_Z7recursej(i32 noundef %add), !dbg !86
265 store ptr %call22, ptr %g, align 8, !dbg !87
266 %14 = load ptr, ptr %g, align 8, !dbg !88
267 call void @llvm.memset.p0.i64(ptr align 1 %14, i8 0, i64 10, i1 false), !dbg !89
268 %15 = load i32, ptr %i, align 4, !dbg !90
269 %tobool = icmp ne i32 %15, 0, !dbg !90
270 br i1 %tobool, label %if.end, label %if.then, !dbg !91
272 if.then: ; preds = %for.body
273 %call23 = call i32 @sleep(i32 noundef 200), !dbg !92
274 br label %if.end, !dbg !92
276 if.end: ; preds = %if.then, %for.body
277 %16 = load ptr, ptr %g, align 8, !dbg !93
278 %isnull24 = icmp eq ptr %16, null, !dbg !94
279 br i1 %isnull24, label %delete.end26, label %delete.notnull25, !dbg !94
281 delete.notnull25: ; preds = %if.end
282 call void @_ZdaPv(ptr noundef %16) #7, !dbg !95
283 br label %delete.end26, !dbg !95
285 delete.end26: ; preds = %delete.notnull25, %if.end
286 br label %for.inc, !dbg !96
288 for.inc: ; preds = %delete.end26
289 %17 = load i32, ptr %i, align 4, !dbg !97
290 %inc = add i32 %17, 1, !dbg !97
291 store i32 %inc, ptr %i, align 4, !dbg !97
292 br label %for.cond, !dbg !99, !llvm.loop !100
294 for.end: ; preds = %for.cond
298 ; MEMPROF: #[[A1]] = { builtin allocsize(0) "memprof"="notcold" }
299 ; MEMPROF: #[[A2]] = { builtin allocsize(0) "memprof"="cold" }
300 ; MEMPROF: ![[M1]] = !{![[MIB1:[0-9]+]], ![[MIB2:[0-9]+]], ![[MIB3:[0-9]+]], ![[MIB4:[0-9]+]], ![[MIB5:[0-9]+]]}
301 ; MEMPROF: ![[MIB1]] = !{![[STACK1:[0-9]+]], !"cold"}
302 ; MEMPROF: ![[STACK1]] = !{i64 2732490490862098848, i64 748269490701775343}
303 ; MEMPROF: ![[MIB2]] = !{![[STACK2:[0-9]+]], !"cold"}
304 ; MEMPROF: ![[STACK2]] = !{i64 2732490490862098848, i64 2104812325165620841, i64 6281715513834610934, i64 6281715513834610934, i64 6281715513834610934, i64 1544787832369987002}
305 ; MEMPROF: ![[MIB3]] = !{![[STACK3:[0-9]+]], !"notcold"}
306 ; MEMPROF: ![[STACK3]] = !{i64 2732490490862098848, i64 2104812325165620841, i64 6281715513834610934, i64 6281715513834610934, i64 6281715513834610934, i64 6281715513834610934}
307 ; MEMPROF: ![[MIB4]] = !{![[STACK4:[0-9]+]], !"cold"}
308 ; MEMPROF: ![[STACK4]] = !{i64 2732490490862098848, i64 8467819354083268568}
309 ; MEMPROF: ![[MIB5]] = !{![[STACK5:[0-9]+]], !"notcold"}
310 ; MEMPROF: ![[STACK5]] = !{i64 2732490490862098848, i64 8690657650969109624}
311 ; MEMPROF: ![[C1]] = !{i64 2732490490862098848}
312 ; MEMPROF: ![[C2]] = !{i64 8467819354083268568}
313 ; MEMPROF: ![[C3]] = !{i64 9086428284934609951}
314 ; MEMPROF: ![[C4]] = !{i64 -5964873800580613432}
315 ; MEMPROF: ![[C5]] = !{i64 2104812325165620841}
316 ; MEMPROF: ![[C6]] = !{i64 6281715513834610934}
317 ; MEMPROF: ![[C7]] = !{i64 8690657650969109624}
318 ; MEMPROF: ![[C8]] = !{i64 748269490701775343}
319 ; MEMPROF: ![[C9]] = !{i64 -5747251260480066785}
320 ; MEMPROF: ![[C10]] = !{i64 2061451396820446691}
321 ; MEMPROF: ![[C11]] = !{i64 1544787832369987002}
324 ; MEMPROFNOCOLINFO: #[[A1]] = { builtin allocsize(0) "memprof"="notcold" }
325 ; MEMPROFNOCOLINFO: #[[A2]] = { builtin allocsize(0) "memprof"="cold" }
326 ; MEMPROFNOCOLINFO: ![[M1]] = !{![[MIB1:[0-9]+]], ![[MIB2:[0-9]+]], ![[MIB3:[0-9]+]], ![[MIB4:[0-9]+]], ![[MIB5:[0-9]+]]}
327 ; MEMPROFNOCOLINFO: ![[MIB1]] = !{![[STACK1:[0-9]+]], !"cold"}
328 ; MEMPROFNOCOLINFO: ![[STACK1]] = !{i64 5281664982037379640, i64 6362220161075421157, i64 -5772587307814069790, i64 -5772587307814069790, i64 -5772587307814069790, i64 3577763375057267810}
329 ; MEMPROFNOCOLINFO: ![[MIB2]] = !{![[STACK2:[0-9]+]], !"notcold"}
330 ; MEMPROFNOCOLINFO: ![[STACK2]] = !{i64 5281664982037379640, i64 6362220161075421157, i64 -5772587307814069790, i64 -5772587307814069790, i64 -5772587307814069790, i64 -5772587307814069790}
331 ; MEMPROFNOCOLINFO: ![[MIB3]] = !{![[STACK3:[0-9]+]], !"notcold"}
332 ; MEMPROFNOCOLINFO: ![[STACK3]] = !{i64 5281664982037379640, i64 -6896091699916449732}
333 ; MEMPROFNOCOLINFO: ![[MIB4]] = !{![[STACK4:[0-9]+]], !"cold"}
334 ; MEMPROFNOCOLINFO: ![[STACK4]] = !{i64 5281664982037379640, i64 -6871734214936418908}
335 ; MEMPROFNOCOLINFO: ![[MIB5]] = !{![[STACK5:[0-9]+]], !"cold"}
336 ; MEMPROFNOCOLINFO: ![[STACK5]] = !{i64 5281664982037379640, i64 -6201180255894224618}
337 ; MEMPROFNOCOLINFO: ![[C1]] = !{i64 5281664982037379640}
338 ; MEMPROFNOCOLINFO: ![[C2]] = !{i64 -6871734214936418908}
339 ; MEMPROFNOCOLINFO: ![[C3]] = !{i64 -5588766871448036195}
340 ; MEMPROFNOCOLINFO: ![[C4]] = !{i64 -8990226808646054327}
341 ; MEMPROFNOCOLINFO: ![[C5]] = !{i64 6362220161075421157}
342 ; MEMPROFNOCOLINFO: ![[C6]] = !{i64 -5772587307814069790}
343 ; MEMPROFNOCOLINFO: ![[C7]] = !{i64 -6896091699916449732}
344 ; MEMPROFNOCOLINFO: ![[C8]] = !{i64 -6201180255894224618}
345 ; MEMPROFNOCOLINFO: ![[C9]] = !{i64 -962804290746547393}
346 ; MEMPROFNOCOLINFO: ![[C10]] = !{i64 -4535090212904553409}
347 ; MEMPROFNOCOLINFO: ![[C11]] = !{i64 3577763375057267810}
349 ; Function Attrs: argmemonly nofree nounwind willreturn writeonly
350 declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3
352 ; Function Attrs: nobuiltin nounwind
353 declare void @_ZdaPv(ptr noundef) #4
355 declare i32 @sleep(i32 noundef) #5
357 attributes #0 = { mustprogress noinline optnone uwtable "disable-tail-calls"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
358 attributes #1 = { nobuiltin allocsize(0) "disable-tail-calls"="true" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
359 attributes #2 = { mustprogress noinline norecurse optnone uwtable "disable-tail-calls"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
360 attributes #3 = { argmemonly nofree nounwind willreturn writeonly }
361 attributes #4 = { nobuiltin nounwind "disable-tail-calls"="true" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
362 attributes #5 = { "disable-tail-calls"="true" "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
363 attributes #6 = { builtin allocsize(0) }
364 attributes #7 = { builtin nounwind }
367 !llvm.module.flags = !{!2, !3, !4, !5, !6, !7, !8}
370 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 15.0.0 (https://github.com/llvm/llvm-project.git 6cbe6284d1f0a088b5c6482ae27b738f03d82fe7)", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, splitDebugInlining: false, debugInfoForProfiling: true, nameTableKind: None)
371 !1 = !DIFile(filename: "memprof.cc", directory: "/usr/local/google/home/tejohnson/llvm/tmp", checksumkind: CSK_MD5, checksum: "e8c40ebe4b21776b4d60e9632cbc13c2")
372 !2 = !{i32 7, !"Dwarf Version", i32 5}
373 !3 = !{i32 2, !"Debug Info Version", i32 3}
374 !4 = !{i32 1, !"wchar_size", i32 4}
375 !5 = !{i32 7, !"PIC Level", i32 2}
376 !6 = !{i32 7, !"PIE Level", i32 2}
377 !7 = !{i32 7, !"uwtable", i32 2}
378 !8 = !{i32 7, !"frame-pointer", i32 2}
379 !9 = !{!"clang version 15.0.0 (https://github.com/llvm/llvm-project.git 6cbe6284d1f0a088b5c6482ae27b738f03d82fe7)"}
380 !10 = distinct !DISubprogram(name: "foo", linkageName: "_Z3foov", scope: !1, file: !1, line: 4, type: !11, scopeLine: 4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
381 !11 = !DISubroutineType(types: !12)
383 !13 = !DILocation(line: 5, column: 10, scope: !10)
384 !14 = !DILocation(line: 5, column: 3, scope: !10)
385 !15 = distinct !DISubprogram(name: "foo2", linkageName: "_Z4foo2v", scope: !1, file: !1, line: 7, type: !11, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
386 !16 = !DILocation(line: 8, column: 10, scope: !15)
387 !17 = !DILocation(line: 8, column: 3, scope: !15)
388 !18 = distinct !DISubprogram(name: "bar", linkageName: "_Z3barv", scope: !1, file: !1, line: 10, type: !11, scopeLine: 10, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
389 !19 = !DILocation(line: 11, column: 10, scope: !18)
390 !20 = !DILocation(line: 11, column: 3, scope: !18)
391 !21 = distinct !DISubprogram(name: "baz", linkageName: "_Z3bazv", scope: !1, file: !1, line: 13, type: !11, scopeLine: 13, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
392 !22 = !DILocation(line: 14, column: 10, scope: !21)
393 !23 = !DILocation(line: 14, column: 3, scope: !21)
394 !24 = distinct !DISubprogram(name: "recurse", linkageName: "_Z7recursej", scope: !1, file: !1, line: 16, type: !11, scopeLine: 16, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
395 !25 = !DILocation(line: 17, column: 8, scope: !24)
396 !26 = !DILocation(line: 17, column: 7, scope: !24)
397 !27 = !DILocation(line: 18, column: 12, scope: !24)
398 !28 = !DILocation(line: 18, column: 5, scope: !24)
399 !29 = !DILocation(line: 19, column: 18, scope: !24)
400 !30 = !DILocation(line: 19, column: 19, scope: !24)
401 !31 = !DILocation(line: 19, column: 10, scope: !24)
402 !32 = !DILocation(line: 19, column: 3, scope: !24)
403 !33 = !DILocation(line: 20, column: 1, scope: !24)
404 !34 = distinct !DISubprogram(name: "main", scope: !1, file: !1, line: 21, type: !11, scopeLine: 21, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12)
405 !35 = !DILocation(line: 25, column: 13, scope: !34)
406 !36 = !DILocation(line: 25, column: 9, scope: !34)
407 !37 = !DILocation(line: 26, column: 13, scope: !34)
408 !38 = !DILocation(line: 26, column: 9, scope: !34)
409 !39 = !DILocation(line: 27, column: 13, scope: !34)
410 !40 = !DILocation(line: 27, column: 9, scope: !34)
411 !41 = !DILocation(line: 28, column: 13, scope: !34)
412 !42 = !DILocation(line: 28, column: 9, scope: !34)
413 !43 = !DILocation(line: 29, column: 13, scope: !34)
414 !44 = !DILocation(line: 29, column: 9, scope: !34)
415 !45 = !DILocation(line: 30, column: 13, scope: !34)
416 !46 = !DILocation(line: 30, column: 9, scope: !34)
417 !47 = !DILocation(line: 31, column: 10, scope: !34)
418 !48 = !DILocation(line: 31, column: 3, scope: !34)
419 !49 = !DILocation(line: 32, column: 10, scope: !34)
420 !50 = !DILocation(line: 32, column: 3, scope: !34)
421 !51 = !DILocation(line: 33, column: 10, scope: !34)
422 !52 = !DILocation(line: 33, column: 3, scope: !34)
423 !53 = !DILocation(line: 34, column: 10, scope: !34)
424 !54 = !DILocation(line: 34, column: 3, scope: !34)
425 !55 = !DILocation(line: 35, column: 10, scope: !34)
426 !56 = !DILocation(line: 35, column: 3, scope: !34)
427 !57 = !DILocation(line: 36, column: 10, scope: !34)
428 !58 = !DILocation(line: 36, column: 3, scope: !34)
429 !59 = !DILocation(line: 38, column: 12, scope: !34)
430 !60 = !DILocation(line: 38, column: 3, scope: !34)
431 !61 = !DILocation(line: 38, column: 3, scope: !62)
432 !62 = !DILexicalBlockFile(scope: !34, file: !1, discriminator: 2)
433 !63 = !DILocation(line: 39, column: 12, scope: !34)
434 !64 = !DILocation(line: 39, column: 3, scope: !34)
435 !65 = !DILocation(line: 39, column: 3, scope: !62)
436 !66 = !DILocation(line: 41, column: 3, scope: !34)
437 !67 = !DILocation(line: 42, column: 12, scope: !34)
438 !68 = !DILocation(line: 42, column: 3, scope: !34)
439 !69 = !DILocation(line: 42, column: 3, scope: !62)
440 !70 = !DILocation(line: 43, column: 12, scope: !34)
441 !71 = !DILocation(line: 43, column: 3, scope: !34)
442 !72 = !DILocation(line: 43, column: 3, scope: !62)
443 !73 = !DILocation(line: 44, column: 12, scope: !34)
444 !74 = !DILocation(line: 44, column: 3, scope: !34)
445 !75 = !DILocation(line: 44, column: 3, scope: !62)
446 !76 = !DILocation(line: 45, column: 12, scope: !34)
447 !77 = !DILocation(line: 45, column: 3, scope: !34)
448 !78 = !DILocation(line: 45, column: 3, scope: !62)
449 !79 = !DILocation(line: 51, column: 17, scope: !34)
450 !80 = !DILocation(line: 51, column: 8, scope: !34)
451 !81 = !DILocation(line: 51, column: 24, scope: !62)
452 !82 = !DILocation(line: 51, column: 26, scope: !62)
453 !83 = !DILocation(line: 51, column: 3, scope: !62)
454 !84 = !DILocation(line: 52, column: 23, scope: !34)
455 !85 = !DILocation(line: 52, column: 25, scope: !34)
456 !86 = !DILocation(line: 52, column: 15, scope: !34)
457 !87 = !DILocation(line: 52, column: 11, scope: !34)
458 !88 = !DILocation(line: 53, column: 12, scope: !34)
459 !89 = !DILocation(line: 53, column: 5, scope: !34)
460 !90 = !DILocation(line: 54, column: 10, scope: !34)
461 !91 = !DILocation(line: 54, column: 9, scope: !34)
462 !92 = !DILocation(line: 55, column: 7, scope: !34)
463 !93 = !DILocation(line: 56, column: 14, scope: !34)
464 !94 = !DILocation(line: 56, column: 5, scope: !34)
465 !95 = !DILocation(line: 56, column: 5, scope: !62)
466 !96 = !DILocation(line: 57, column: 3, scope: !34)
467 !97 = !DILocation(line: 51, column: 32, scope: !98)
468 !98 = !DILexicalBlockFile(scope: !34, file: !1, discriminator: 4)
469 !99 = !DILocation(line: 51, column: 3, scope: !98)
470 !100 = distinct !{!100, !101, !96, !102}
471 !101 = !DILocation(line: 51, column: 3, scope: !34)
472 !102 = !{!"llvm.loop.mustprogress"}
473 !103 = !DILocation(line: 58, column: 3, scope: !34)