xref: /llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/track-assignments.ll (revision 094572701dce4aaf36f4521d6cf750420d39f206)
1; RUN: opt -passes='declare-to-assign,verify' %s -S -o - \
2; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
3; RUN: opt --try-experimental-debuginfo-iterators -passes='declare-to-assign,verify' %s -S -o - \
4; RUN: | FileCheck %s --implicit-check-not="call void @llvm.dbg"
5
6;; This test checks that `trackAssignments` is working correctly by using the
7;; pass-wrapper `declare-to-assign`. Each function checks some specific
8;; functionality and has its checks inline.
9
10;; $ cat test.cpp
11;; struct Inner { int A, B; };
12;; struct Outer { Inner A, B; };
13;; struct Large { int A[10]; };
14;; struct LCopyCtor { int A[4]; LCopyCtor(); LCopyCtor(LCopyCtor const &); };
15;; int Value, Index, Cond;
16;; Inner InnerA, InnerB;
17;; Large L;
18;;
19;; void zeroInit() { int Z[3] = {0, 0, 0}; }
20;;
21;; void memcpyInit() { int A[4] = {0, 1, 2, 3}; }
22;;
23;; void setField() {
24;;   Outer O;
25;;   O.A.B = Value;
26;; }
27;;
28;; void unknownOffset() {
29;;   int A[2];
30;;   A[Index] = Value;
31;; }
32;;
33;; Inner sharedAlloca() {
34;;   if (Cond) {
35;;     Inner A = InnerA;
36;;     return A;
37;;   } else {
38;;     Inner B = InnerB;
39;;     return B;
40;;   }
41;; }
42;;
43;; Large sret() {
44;;   Large X = L;
45;;   return X;
46;; }
47;;
48;; void byval(Large X) {}
49;;
50;; LCopyCtor indirectReturn() {
51;;  LCopyCtor R;
52;;  return R;
53;; }
54;;
55;; $ clang++ -g test.cpp -o - -emit-llvm -S -Xclang -disable-llvm-passes -O2
56;;
57;; Then these functions are added manually to the IR using
58;;     $ clang++ -g test.cpp -o - -emit-llvm -S -O0
59;; and removing the optnone attributes:
60;;
61;; __attribute__((always_inline))
62;; int sqr(int Y) { return Y * Y;  }
63;; int fun(int X) { return sqr(X); }
64
65
66source_filename = "test.cpp"
67target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
68target triple = "x86_64-unknown-linux-gnu"
69
70%struct.Inner = type { i32, i32 }
71%struct.Large = type { [10 x i32] }
72%struct.Outer = type { %struct.Inner, %struct.Inner }
73%struct.LCopyCtor = type { [4 x i32] }
74
75@Value = dso_local global i32 0, align 4, !dbg !0
76@Index = dso_local global i32 0, align 4, !dbg !5
77@Cond = dso_local global i32 0, align 4, !dbg !8
78@InnerA = dso_local global %struct.Inner zeroinitializer, align 4, !dbg !10
79@InnerB = dso_local global %struct.Inner zeroinitializer, align 4, !dbg !16
80@L = dso_local global %struct.Large zeroinitializer, align 4, !dbg !18
81@__const._Z10memcpyInitv.A = private unnamed_addr constant [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 16
82
83;; Zero init with a memset.
84;;
85;;    void zeroInit() { int Z[3] = {0, 0, 0}; }
86;;
87;; Check that we get two dbg.assign intrinsics. The first linked to the alloca
88;; and the second linked to the zero-init-memset, which should have a constant 0
89;; for the value component.
90define dso_local void @_Z8zeroInitv() #0 !dbg !31 {
91; CHECK-LABEL: define dso_local void @_Z8zeroInitv
92entry:
93  %Z = alloca [3 x i32], align 4
94; CHECK:      %Z = alloca [3 x i32], align 4, !DIAssignID ![[ID_0:[0-9]+]]
95; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_0:[0-9]+]], !DIExpression(), ![[ID_0]], ptr %Z, !DIExpression(),
96  %0 = bitcast ptr %Z to ptr, !dbg !39
97  call void @llvm.lifetime.start.p0(i64 12, ptr %0) #5, !dbg !39
98  call void @llvm.dbg.declare(metadata ptr %Z, metadata !35, metadata !DIExpression()), !dbg !40
99  %1 = bitcast ptr %Z to ptr, !dbg !40
100  call void @llvm.memset.p0.i64(ptr align 4 %1, i8 0, i64 12, i1 false), !dbg !40
101; CHECK:       @llvm.memset{{.*}}, !DIAssignID ![[ID_1:[0-9]+]]
102; CHECK-NEXT:  #dbg_assign(i8 0, ![[VAR_0]], !DIExpression(), ![[ID_1]], ptr %1, !DIExpression(),
103  %2 = bitcast ptr %Z to ptr, !dbg !41
104  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #5, !dbg !41
105  ret void, !dbg !41
106}
107
108;; Init with a memcpy (from a global).
109;;
110;;    void memcpyInit() { int A[4] = {0, 1, 2, 3}; }
111;;
112;; Check that we get two dbg.assign intrinsics. The first linked to the alloca
113;; and the second linked to the initialising memcpy, which should have an Undef
114;; value component.
115define dso_local void @_Z10memcpyInitv() #0 !dbg !42 {
116; CHECK-LABEL: define dso_local void @_Z10memcpyInitv
117entry:
118  %A = alloca [4 x i32], align 16
119; CHECK:      %A = alloca [4 x i32], align 16, !DIAssignID ![[ID_2:[0-9]+]]
120; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_1:[0-9]+]], !DIExpression(), ![[ID_2]], ptr %A, !DIExpression(),
121  %0 = bitcast ptr %A to ptr, !dbg !48
122  call void @llvm.lifetime.start.p0(i64 16, ptr %0) #5, !dbg !48
123  call void @llvm.dbg.declare(metadata ptr %A, metadata !44, metadata !DIExpression()), !dbg !49
124  %1 = bitcast ptr %A to ptr, !dbg !49
125  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %1, ptr align 16 @__const._Z10memcpyInitv.A, i64 16, i1 false), !dbg !49
126; CHECK:       @llvm.memcpy{{.*}}, !DIAssignID ![[ID_3:[0-9]+]]
127; CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_1]], !DIExpression(), ![[ID_3]], ptr %1, !DIExpression(),
128  %2 = bitcast ptr %A to ptr, !dbg !50
129  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #5, !dbg !50
130  ret void, !dbg !50
131}
132
133;; Assign to field of local variable.
134;;
135;;    void setField() {
136;;      Outer O;
137;;      O.A.B = Value;
138;;    }
139;;
140;; Check that we get two dbg.assign intrinsics. The first linked to the alloca
141;; and the second linked to the store to O.A.B, which should include the
142;; appropriate fragment info (SizeInBits: 32, OffsetInBits: 32) with respect to
143;; the base variable.
144define dso_local void @_Z8setFieldv() #0 !dbg !51 {
145; CHECK-LABEL: define dso_local void @_Z8setFieldv
146entry:
147  %O = alloca %struct.Outer, align 4
148; CHECK:      %O = alloca %struct.Outer, align 4, !DIAssignID ![[ID_4:[0-9]+]]
149; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_2:[0-9]+]], !DIExpression(), ![[ID_4]], ptr %O, !DIExpression(),
150  %0 = bitcast ptr %O to ptr, !dbg !58
151  call void @llvm.lifetime.start.p0(i64 16, ptr %0) #5, !dbg !58
152  call void @llvm.dbg.declare(metadata ptr %O, metadata !53, metadata !DIExpression()), !dbg !59
153  %1 = load i32, ptr @Value, align 4, !dbg !60, !tbaa !61
154  %A = getelementptr inbounds %struct.Outer, ptr %O, i32 0, i32 0, !dbg !65
155  %B = getelementptr inbounds %struct.Inner, ptr %A, i32 0, i32 1, !dbg !66
156  store i32 %1, ptr %B, align 4, !dbg !67, !tbaa !68
157; CHECK:      store i32 %1, ptr %B, align 4,{{.*}}!DIAssignID ![[ID_5:[0-9]+]]
158; CHECK-NEXT: #dbg_assign(i32 %1, ![[VAR_2]], !DIExpression(DW_OP_LLVM_fragment, 32, 32), ![[ID_5]], ptr %B, !DIExpression(),
159  %2 = bitcast ptr %O to ptr, !dbg !71
160  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #5, !dbg !71
161  ret void, !dbg !71
162}
163
164;; Assign to (statically) unknown offset into a local variable.
165;;
166;;   void unknownOffset() {
167;;     int A[2];
168;;     A[Index] = Value;
169;;   }
170;;
171;; Check that we get only one dbg.assign intrinsic and that it is linked to the
172;; alloca. The assignment doesn't get a dbg.assign intrinsic because we cannot
173;; encode the fragment info for the assignment.
174;; Note: This doesn't mean we lose the assignment entirely: the backend will
175;; interpret the store (as it sees it) as an assignment.
176define dso_local void @_Z13unknownOffsetv() #0 !dbg !72 {
177; CHECK-LABEL: define dso_local void @_Z13unknownOffsetv
178entry:
179  %A = alloca [2 x i32], align 4
180; CHECK:      %A = alloca [2 x i32], align 4, !DIAssignID ![[ID_6:[0-9]+]]
181; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_3:[0-9]+]], !DIExpression(), ![[ID_6]], ptr %A, !DIExpression(),
182  %0 = bitcast ptr %A to ptr, !dbg !78
183  call void @llvm.lifetime.start.p0(i64 8, ptr %0) #5, !dbg !78
184  call void @llvm.dbg.declare(metadata ptr %A, metadata !74, metadata !DIExpression()), !dbg !79
185  %1 = load i32, ptr @Value, align 4, !dbg !80, !tbaa !61
186  %2 = load i32, ptr @Index, align 4, !dbg !81, !tbaa !61
187  %idxprom = sext i32 %2 to i64, !dbg !82
188  %arrayidx = getelementptr inbounds [2 x i32], ptr %A, i64 0, i64 %idxprom, !dbg !82
189  store i32 %1, ptr %arrayidx, align 4, !dbg !83, !tbaa !61
190  %3 = bitcast ptr %A to ptr, !dbg !84
191  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5, !dbg !84
192  ret void, !dbg !84
193}
194
195;; Assignments to variables which share the same backing storage.
196;;
197;; Inner sharedAlloca() {
198;;   if (Cond) {
199;;     Inner A = InnerA;
200;;     return A;
201;;   } else {
202;;     Inner B = InnerB;
203;;     return B;
204;;   }
205;; }
206;;
207define dso_local i64 @_Z12sharedAllocav() #0 !dbg !85 {
208; CHECK-LABEL: define dso_local i64 @_Z12sharedAllocav
209entry:
210  %retval = alloca %struct.Inner, align 4
211; CHECK:      %retval = alloca %struct.Inner, align 4, !DIAssignID ![[ID_7:[0-9]+]]
212; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_4:[0-9]+]], !DIExpression(), ![[ID_7]], ptr %retval, !DIExpression(),
213; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_5:[0-9]+]], !DIExpression(), ![[ID_7]], ptr %retval, !DIExpression(),
214  %0 = load i32, ptr @Cond, align 4, !dbg !94, !tbaa !61
215  %tobool = icmp ne i32 %0, 0, !dbg !94
216  br i1 %tobool, label %if.then, label %if.else, !dbg !95
217
218if.then:                                          ; preds = %entry
219; CHECK:      if.then:
220  call void @llvm.dbg.declare(metadata ptr %retval, metadata !89, metadata !DIExpression()), !dbg !96
221  %1 = bitcast ptr %retval to ptr, !dbg !97
222  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %1, ptr align 4 @InnerA, i64 8, i1 false), !dbg !97, !tbaa.struct !98
223; CHECK:      call void @llvm.memcpy{{.*}}, !DIAssignID ![[ID_8:[0-9]+]]
224; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_4]], !DIExpression(), ![[ID_8]], ptr %1, !DIExpression(),
225; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_5]], !DIExpression(), ![[ID_8]], ptr %1, !DIExpression(),
226  br label %return, !dbg !99
227
228if.else:                                          ; preds = %entry
229; CHECK:      if.else:
230  call void @llvm.dbg.declare(metadata ptr %retval, metadata !92, metadata !DIExpression()), !dbg !100
231  %2 = bitcast ptr %retval to ptr, !dbg !101
232  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 4 @InnerB, i64 8, i1 false), !dbg !101, !tbaa.struct !98
233; CHECK:      call void @llvm.memcpy{{.*}}, !DIAssignID ![[ID_9:[0-9]+]]
234; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_4]], !DIExpression(), ![[ID_9]], ptr %2, !DIExpression(),
235; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_5]], !DIExpression(), ![[ID_9]], ptr %2, !DIExpression(),
236  br label %return, !dbg !102
237
238return:                                           ; preds = %if.else, %if.then
239  %3 = bitcast ptr %retval to ptr, !dbg !103
240  %4 = load i64, ptr %3, align 4, !dbg !103
241  ret i64 %4, !dbg !103
242}
243
244;; Caller-allocated memory for a local (sret parameter).
245;;
246;;    Large sret() {
247;;      Large X = L;
248;;      return X;
249;;    }
250;;
251;; TODO: Currently not supported by `trackAssignments` (or the rest of the
252;; assignment tracking pipeline). In lieu of being able to xfail a part of a
253;; test, check that the dbg.declare is preserved so the test fails (and can be
254;; updated) when this is fixed.
255define dso_local void @_Z4sretv(ptr noalias sret(%struct.Large) align 4 %agg.result) #0 !dbg !104 {
256; CHECK-LABEL: define dso_local void @_Z4sretv
257entry:
258; CHECK: #dbg_declare
259  call void @llvm.dbg.declare(metadata ptr %agg.result, metadata !108, metadata !DIExpression()), !dbg !109
260  %0 = bitcast ptr %agg.result to ptr, !dbg !110
261  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 @L, i64 40, i1 false), !dbg !110, !tbaa.struct !111
262  ret void, !dbg !113
263}
264
265;; Caller-allocated memory for a local (byval parameter).
266;;
267;;    void byval(Large X) {}
268;;
269;; TODO: See comment for sret parameters above.
270define dso_local void @_Z5byval5Large(ptr noundef byval(%struct.Large) align 8 %X) #0 !dbg !114 {
271; CHECK-LABEL: define dso_local void @_Z5byval5Large
272entry:
273; CHECK: #dbg_declare
274  call void @llvm.dbg.declare(metadata ptr %X, metadata !118, metadata !DIExpression()), !dbg !119
275  ret void, !dbg !120
276}
277
278;; Caller-allocated memory for a local (sret parameter) with address stored to
279;; local alloca.
280;;
281;;    LCopyCtor indirectReturn() {
282;;      LCopyCtor R;
283;;      return R;
284;;    }
285;;
286;; A sret parameter is used here also, but in this case clang emits an alloca
287;; to store the passed-in address for the storage for the variable. The
288;; dbg.declare for the local R therefore requires a DW_OP_deref expression.
289;; TODO: This isn't supported yet, so check the dbg.declare remains.
290define dso_local void @_Z14indirectReturnv(ptr noalias sret(%struct.LCopyCtor) align 4 %agg.result) #0 !dbg !121 {
291; CHECK-LABEL: define dso_local void @_Z14indirectReturnv
292entry:
293  %result.ptr = alloca ptr, align 8
294  %0 = bitcast ptr %agg.result to ptr
295  store ptr %0, ptr %result.ptr, align 8
296  call void @llvm.dbg.declare(metadata ptr %result.ptr, metadata !126, metadata !DIExpression(DW_OP_deref)), !dbg !127
297; CHECK: #dbg_declare
298  call void @_ZN9LCopyCtorC1Ev(ptr noundef nonnull align 4 dereferenceable(16) %agg.result), !dbg !127
299  ret void, !dbg !128
300}
301
302;; Inlined variable.
303;;
304;;    __attribute__((always_inline))
305;;    int sqr(int Y) { return Y * Y;  }
306;;    int fun(int X) { return sqr(X); }
307;;
308;; Check that dbg.assign intrinsics correctly inherit the !dbg attachment from
309;; the dbg.declre.
310define dso_local noundef i32 @_Z3funi(i32 noundef %X) !dbg !139 {
311; CHECK-LABEL: define dso_local noundef i32 @_Z3funi
312entry:
313  %Y.addr.i = alloca i32, align 4
314; CHECK:      %Y.addr.i = alloca i32, align 4, !DIAssignID ![[ID_10:[0-9]+]]
315; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_6:[0-9]+]], !DIExpression(), ![[ID_10]], ptr %Y.addr.i, !DIExpression(), ![[DBG_0:[0-9]+]]
316  %X.addr = alloca i32, align 4
317; CHECK-NEXT: %X.addr = alloca i32, align 4, !DIAssignID ![[ID_11:[0-9]+]]
318; CHECK-NEXT: #dbg_assign(i1 undef, ![[VAR_7:[0-9]+]], !DIExpression(), ![[ID_11]], ptr %X.addr, !DIExpression(), ![[DBG_1:[0-9]+]]
319  store i32 %X, ptr %X.addr, align 4
320; CHECK-NEXT: store i32 %X, ptr %X.addr, align 4, !DIAssignID ![[ID_12:[0-9]+]]
321; CHECK-NEXT: #dbg_assign(i32 %X, ![[VAR_7]], !DIExpression(), ![[ID_12]], ptr %X.addr, !DIExpression(), ![[DBG_1]]
322  call void @llvm.dbg.declare(metadata ptr %X.addr, metadata !140, metadata !DIExpression()), !dbg !141
323  %0 = load i32, ptr %X.addr, align 4, !dbg !142
324  store i32 %0, ptr %Y.addr.i, align 4
325; CHECK:      store i32 %0, ptr %Y.addr.i, align 4, !DIAssignID ![[ID_13:[0-9]+]]
326; CHECK-NEXT: #dbg_assign(i32 %0, ![[VAR_6]], !DIExpression(), ![[ID_13]], ptr %Y.addr.i, !DIExpression(), ![[DBG_0]]
327  call void @llvm.dbg.declare(metadata ptr %Y.addr.i, metadata !133, metadata !DIExpression()), !dbg !143
328  %1 = load i32, ptr %Y.addr.i, align 4, !dbg !145
329  %2 = load i32, ptr %Y.addr.i, align 4, !dbg !146
330  %mul.i = mul nsw i32 %1, %2, !dbg !147
331  ret i32 %mul.i, !dbg !148
332}
333
334declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1
335declare void @llvm.dbg.declare(metadata, metadata, metadata) #2
336declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3
337declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4
338declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1
339declare dso_local void @_ZN9LCopyCtorC1Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr
340
341!llvm.dbg.cu = !{!2}
342!llvm.module.flags = !{!26, !27, !28, !29, !1000}
343!llvm.ident = !{!30}
344
345; CHECK-DAG: ![[VAR_0]] = !DILocalVariable(name: "Z",
346; CHECK-DAG: ![[VAR_1]] = !DILocalVariable(name: "A",
347; CHECK-DAG: ![[VAR_2]] = !DILocalVariable(name: "O",
348; CHECK-DAG: ![[VAR_3]] = !DILocalVariable(name: "A",
349; CHECK-DAG: ![[VAR_4]] = !DILocalVariable(name: "B",
350; CHECK-DAG: ![[VAR_5]] = !DILocalVariable(name: "A",
351; CHECK-DAG: ![[VAR_6]] = !DILocalVariable(name: "Y", arg: 1, scope: ![[SQR:[0-9]+]],
352; CHECK-DAG: ![[VAR_7]] = !DILocalVariable(name: "X", arg: 1, scope: ![[FUN:[0-9]+]],
353; CHECK-DAG: ![[SQR]] = distinct !DISubprogram(name: "sqr",
354; CHECK-DAG: ![[FUN]] = distinct !DISubprogram(name: "fun",
355; CHECK-DAG: ![[DBG_0]] = !DILocation(line: 0, scope: ![[SQR]], inlinedAt: ![[SQR_INLINE_SITE:[0-9]+]])
356; CHECK-DAG: [[SQR_INLINE_SITE]] = distinct !DILocation(line: 3, column: 25, scope: ![[FUN]])
357; CHECK-DAG: ![[DBG_1]] = !DILocation(line: 0, scope: ![[FUN]])
358
359!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
360!1 = distinct !DIGlobalVariable(name: "Value", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)
361!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 14.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
362!3 = !DIFile(filename: "test.cpp", directory: "/")
363!4 = !{!0, !5, !8, !10, !16, !18}
364!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())
365!6 = distinct !DIGlobalVariable(name: "Index", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)
366!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
367!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression())
368!9 = distinct !DIGlobalVariable(name: "Cond", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)
369!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression())
370!11 = distinct !DIGlobalVariable(name: "InnerA", scope: !2, file: !3, line: 6, type: !12, isLocal: false, isDefinition: true)
371!12 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Inner", file: !3, line: 1, size: 64, flags: DIFlagTypePassByValue, elements: !13, identifier: "_ZTS5Inner")
372!13 = !{!14, !15}
373!14 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !12, file: !3, line: 1, baseType: !7, size: 32)
374!15 = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !12, file: !3, line: 1, baseType: !7, size: 32, offset: 32)
375!16 = !DIGlobalVariableExpression(var: !17, expr: !DIExpression())
376!17 = distinct !DIGlobalVariable(name: "InnerB", scope: !2, file: !3, line: 6, type: !12, isLocal: false, isDefinition: true)
377!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression())
378!19 = distinct !DIGlobalVariable(name: "L", scope: !2, file: !3, line: 7, type: !20, isLocal: false, isDefinition: true)
379!20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Large", file: !3, line: 3, size: 320, flags: DIFlagTypePassByValue, elements: !21, identifier: "_ZTS5Large")
380!21 = !{!22}
381!22 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !20, file: !3, line: 3, baseType: !23, size: 320)
382!23 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 320, elements: !24)
383!24 = !{!25}
384!25 = !DISubrange(count: 10)
385!26 = !{i32 7, !"Dwarf Version", i32 5}
386!27 = !{i32 2, !"Debug Info Version", i32 3}
387!28 = !{i32 1, !"wchar_size", i32 4}
388!29 = !{i32 7, !"uwtable", i32 1}
389!30 = !{!"clang version 14.0.0"}
390!31 = distinct !DISubprogram(name: "zeroInit", linkageName: "_Z8zeroInitv", scope: !3, file: !3, line: 9, type: !32, scopeLine: 9, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !34)
391!32 = !DISubroutineType(types: !33)
392!33 = !{null}
393!34 = !{!35}
394!35 = !DILocalVariable(name: "Z", scope: !31, file: !3, line: 9, type: !36)
395!36 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 96, elements: !37)
396!37 = !{!38}
397!38 = !DISubrange(count: 3)
398!39 = !DILocation(line: 9, column: 19, scope: !31)
399!40 = !DILocation(line: 9, column: 23, scope: !31)
400!41 = !DILocation(line: 9, column: 41, scope: !31)
401!42 = distinct !DISubprogram(name: "memcpyInit", linkageName: "_Z10memcpyInitv", scope: !3, file: !3, line: 11, type: !32, scopeLine: 11, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !43)
402!43 = !{!44}
403!44 = !DILocalVariable(name: "A", scope: !42, file: !3, line: 11, type: !45)
404!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 128, elements: !46)
405!46 = !{!47}
406!47 = !DISubrange(count: 4)
407!48 = !DILocation(line: 11, column: 21, scope: !42)
408!49 = !DILocation(line: 11, column: 25, scope: !42)
409!50 = !DILocation(line: 11, column: 46, scope: !42)
410!51 = distinct !DISubprogram(name: "setField", linkageName: "_Z8setFieldv", scope: !3, file: !3, line: 13, type: !32, scopeLine: 13, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !52)
411!52 = !{!53}
412!53 = !DILocalVariable(name: "O", scope: !51, file: !3, line: 14, type: !54)
413!54 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Outer", file: !3, line: 2, size: 128, flags: DIFlagTypePassByValue, elements: !55, identifier: "_ZTS5Outer")
414!55 = !{!56, !57}
415!56 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !54, file: !3, line: 2, baseType: !12, size: 64)
416!57 = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !54, file: !3, line: 2, baseType: !12, size: 64, offset: 64)
417!58 = !DILocation(line: 14, column: 3, scope: !51)
418!59 = !DILocation(line: 14, column: 9, scope: !51)
419!60 = !DILocation(line: 15, column: 11, scope: !51)
420!61 = !{!62, !62, i64 0}
421!62 = !{!"int", !63, i64 0}
422!63 = !{!"omnipotent char", !64, i64 0}
423!64 = !{!"Simple C++ TBAA"}
424!65 = !DILocation(line: 15, column: 5, scope: !51)
425!66 = !DILocation(line: 15, column: 7, scope: !51)
426!67 = !DILocation(line: 15, column: 9, scope: !51)
427!68 = !{!69, !62, i64 4}
428!69 = !{!"_ZTS5Outer", !70, i64 0, !70, i64 8}
429!70 = !{!"_ZTS5Inner", !62, i64 0, !62, i64 4}
430!71 = !DILocation(line: 16, column: 1, scope: !51)
431!72 = distinct !DISubprogram(name: "unknownOffset", linkageName: "_Z13unknownOffsetv", scope: !3, file: !3, line: 18, type: !32, scopeLine: 18, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !73)
432!73 = !{!74}
433!74 = !DILocalVariable(name: "A", scope: !72, file: !3, line: 19, type: !75)
434!75 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 64, elements: !76)
435!76 = !{!77}
436!77 = !DISubrange(count: 2)
437!78 = !DILocation(line: 19, column: 3, scope: !72)
438!79 = !DILocation(line: 19, column: 7, scope: !72)
439!80 = !DILocation(line: 20, column: 14, scope: !72)
440!81 = !DILocation(line: 20, column: 5, scope: !72)
441!82 = !DILocation(line: 20, column: 3, scope: !72)
442!83 = !DILocation(line: 20, column: 12, scope: !72)
443!84 = !DILocation(line: 21, column: 1, scope: !72)
444!85 = distinct !DISubprogram(name: "sharedAlloca", linkageName: "_Z12sharedAllocav", scope: !3, file: !3, line: 23, type: !86, scopeLine: 23, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !88)
445!86 = !DISubroutineType(types: !87)
446!87 = !{!12}
447!88 = !{!89, !92}
448!89 = !DILocalVariable(name: "A", scope: !90, file: !3, line: 25, type: !12)
449!90 = distinct !DILexicalBlock(scope: !91, file: !3, line: 24, column: 13)
450!91 = distinct !DILexicalBlock(scope: !85, file: !3, line: 24, column: 7)
451!92 = !DILocalVariable(name: "B", scope: !93, file: !3, line: 28, type: !12)
452!93 = distinct !DILexicalBlock(scope: !91, file: !3, line: 27, column: 10)
453!94 = !DILocation(line: 24, column: 7, scope: !91)
454!95 = !DILocation(line: 24, column: 7, scope: !85)
455!96 = !DILocation(line: 25, column: 11, scope: !90)
456!97 = !DILocation(line: 25, column: 15, scope: !90)
457!98 = !{i64 0, i64 4, !61, i64 4, i64 4, !61}
458!99 = !DILocation(line: 26, column: 5, scope: !90)
459!100 = !DILocation(line: 28, column: 11, scope: !93)
460!101 = !DILocation(line: 28, column: 15, scope: !93)
461!102 = !DILocation(line: 29, column: 5, scope: !93)
462!103 = !DILocation(line: 31, column: 1, scope: !85)
463!104 = distinct !DISubprogram(name: "sret", linkageName: "_Z4sretv", scope: !3, file: !3, line: 33, type: !105, scopeLine: 33, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !107)
464!105 = !DISubroutineType(types: !106)
465!106 = !{!20}
466!107 = !{!108}
467!108 = !DILocalVariable(name: "X", scope: !104, file: !3, line: 34, type: !20)
468!109 = !DILocation(line: 34, column: 9, scope: !104)
469!110 = !DILocation(line: 34, column: 13, scope: !104)
470!111 = !{i64 0, i64 40, !112}
471!112 = !{!63, !63, i64 0}
472!113 = !DILocation(line: 35, column: 3, scope: !104)
473!114 = distinct !DISubprogram(name: "byval", linkageName: "_Z5byval5Large", scope: !3, file: !3, line: 38, type: !115, scopeLine: 38, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !2, retainedNodes: !117)
474!115 = !DISubroutineType(types: !116)
475!116 = !{null, !20}
476!117 = !{!118}
477!118 = !DILocalVariable(name: "X", arg: 1, scope: !114, file: !3, line: 38, type: !20)
478!119 = !DILocation(line: 38, column: 18, scope: !114)
479!120 = !DILocation(line: 38, column: 22, scope: !114)
480!121 = distinct !DISubprogram(name: "indirectReturn", linkageName: "_Z14indirectReturnv", scope: !2, file: !3, line: 41, type: !122, scopeLine: 41, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !125)
481!122 = !DISubroutineType(types: !123)
482!123 = !{!124}
483!124 = !DICompositeType(tag: DW_TAG_structure_type, name: "LCopyCtor", file: !3, line: 4, size: 128, flags: DIFlagFwdDecl | DIFlagNonTrivial, identifier: "_ZTS9LCopyCtor")
484!125 = !{}
485!126 = !DILocalVariable(name: "R", scope: !121, file: !3, line: 42, type: !124)
486!127 = !DILocation(line: 42, column: 13, scope: !121)
487!128 = !DILocation(line: 43, column: 3, scope: !121)
488!129 = distinct !DISubprogram(name: "sqr", linkageName: "_Z3sqri", scope: !2, file: !3, line: 2, type: !130, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !132)
489!130 = !DISubroutineType(types: !131)
490!131 = !{!7, !7}
491!132 = !{}
492!133 = !DILocalVariable(name: "Y", arg: 1, scope: !129, file: !3, line: 2, type: !7)
493!134 = !DILocation(line: 2, column: 13, scope: !129)
494!135 = !DILocation(line: 2, column: 25, scope: !129)
495!136 = !DILocation(line: 2, column: 29, scope: !129)
496!137 = !DILocation(line: 2, column: 27, scope: !129)
497!138 = !DILocation(line: 2, column: 18, scope: !129)
498!139 = distinct !DISubprogram(name: "fun", linkageName: "_Z3funi", scope: !2, file: !3, line: 3, type: !130, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !132)
499!140 = !DILocalVariable(name: "X", arg: 1, scope: !139, file: !3, line: 3, type: !7)
500!141 = !DILocation(line: 3, column: 13, scope: !139)
501!142 = !DILocation(line: 3, column: 29, scope: !139)
502!143 = !DILocation(line: 2, column: 13, scope: !129, inlinedAt: !144)
503!144 = distinct !DILocation(line: 3, column: 25, scope: !139)
504!145 = !DILocation(line: 2, column: 25, scope: !129, inlinedAt: !144)
505!146 = !DILocation(line: 2, column: 29, scope: !129, inlinedAt: !144)
506!147 = !DILocation(line: 2, column: 27, scope: !129, inlinedAt: !144)
507!148 = !DILocation(line: 3, column: 18, scope: !139)
508!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true}
509