brintos

brintos / llvm-project-archived public Read only

0
0
Text · 25.7 KiB · 853ca65 Raw
507 lines · plain
1; RUN: opt -passes='declare-to-assign,verify' %s -S -o - \2; RUN: | FileCheck %s --implicit-check-not="#dbg_"3 4;; This test checks that `trackAssignments` is working correctly by using the5;; pass-wrapper `declare-to-assign`. Each function checks some specific6;; functionality and has its checks inline.7 8;; $ cat test.cpp9;; struct Inner { int A, B; };10;; struct Outer { Inner A, B; };11;; struct Large { int A[10]; };12;; struct LCopyCtor { int A[4]; LCopyCtor(); LCopyCtor(LCopyCtor const &); };13;; int Value, Index, Cond;14;; Inner InnerA, InnerB;15;; Large L;16;;17;; void zeroInit() { int Z[3] = {0, 0, 0}; }18;;19;; void memcpyInit() { int A[4] = {0, 1, 2, 3}; }20;;21;; void setField() {22;;   Outer O;23;;   O.A.B = Value;24;; }25;;26;; void unknownOffset() {27;;   int A[2];28;;   A[Index] = Value;29;; }30;;31;; Inner sharedAlloca() {32;;   if (Cond) {33;;     Inner A = InnerA;34;;     return A;35;;   } else {36;;     Inner B = InnerB;37;;     return B;38;;   }39;; }40;;41;; Large sret() {42;;   Large X = L;43;;   return X;44;; }45;;46;; void byval(Large X) {}47;;48;; LCopyCtor indirectReturn() {49;;  LCopyCtor R;50;;  return R;51;; }52;;53;; $ clang++ -g test.cpp -o - -emit-llvm -S -Xclang -disable-llvm-passes -O254;;55;; Then these functions are added manually to the IR using56;;     $ clang++ -g test.cpp -o - -emit-llvm -S -O057;; and removing the optnone attributes:58;;59;; __attribute__((always_inline))60;; int sqr(int Y) { return Y * Y;  }61;; int fun(int X) { return sqr(X); }62 63 64source_filename = "test.cpp"65target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"66target triple = "x86_64-unknown-linux-gnu"67 68%struct.Inner = type { i32, i32 }69%struct.Large = type { [10 x i32] }70%struct.Outer = type { %struct.Inner, %struct.Inner }71%struct.LCopyCtor = type { [4 x i32] }72 73@Value = dso_local global i32 0, align 4, !dbg !074@Index = dso_local global i32 0, align 4, !dbg !575@Cond = dso_local global i32 0, align 4, !dbg !876@InnerA = dso_local global %struct.Inner zeroinitializer, align 4, !dbg !1077@InnerB = dso_local global %struct.Inner zeroinitializer, align 4, !dbg !1678@L = dso_local global %struct.Large zeroinitializer, align 4, !dbg !1879@__const._Z10memcpyInitv.A = private unnamed_addr constant [4 x i32] [i32 0, i32 1, i32 2, i32 3], align 1680 81;; Zero init with a memset.82;;83;;    void zeroInit() { int Z[3] = {0, 0, 0}; }84;;85;; Check that we get two dbg.assign intrinsics. The first linked to the alloca86;; and the second linked to the zero-init-memset, which should have a constant 087;; for the value component.88define dso_local void @_Z8zeroInitv() #0 !dbg !31 {89; CHECK-LABEL: define dso_local void @_Z8zeroInitv90entry:91  %Z = alloca [3 x i32], align 492; CHECK:      %Z = alloca [3 x i32], align 4, !DIAssignID ![[ID_0:[0-9]+]]93; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_0:[0-9]+]], !DIExpression(), ![[ID_0]], ptr %Z, !DIExpression(),94  %0 = bitcast ptr %Z to ptr, !dbg !3995  call void @llvm.lifetime.start.p0(i64 12, ptr %0) #5, !dbg !3996  call void @llvm.dbg.declare(metadata ptr %Z, metadata !35, metadata !DIExpression()), !dbg !4097  %1 = bitcast ptr %Z to ptr, !dbg !4098  call void @llvm.memset.p0.i64(ptr align 4 %1, i8 0, i64 12, i1 false), !dbg !4099; CHECK:       @llvm.memset{{.*}}, !DIAssignID ![[ID_1:[0-9]+]]100; CHECK-NEXT:  #dbg_assign(i8 0, ![[VAR_0]], !DIExpression(), ![[ID_1]], ptr %1, !DIExpression(),101  %2 = bitcast ptr %Z to ptr, !dbg !41102  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #5, !dbg !41103  ret void, !dbg !41104}105 106;; Init with a memcpy (from a global).107;;108;;    void memcpyInit() { int A[4] = {0, 1, 2, 3}; }109;;110;; Check that we get two dbg.assign intrinsics. The first linked to the alloca111;; and the second linked to the initialising memcpy, which should have a poison112;; value component.113define dso_local void @_Z10memcpyInitv() #0 !dbg !42 {114; CHECK-LABEL: define dso_local void @_Z10memcpyInitv115entry:116  %A = alloca [4 x i32], align 16117; CHECK:      %A = alloca [4 x i32], align 16, !DIAssignID ![[ID_2:[0-9]+]]118; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_1:[0-9]+]], !DIExpression(), ![[ID_2]], ptr %A, !DIExpression(),119  %0 = bitcast ptr %A to ptr, !dbg !48120  call void @llvm.lifetime.start.p0(i64 16, ptr %0) #5, !dbg !48121  call void @llvm.dbg.declare(metadata ptr %A, metadata !44, metadata !DIExpression()), !dbg !49122  %1 = bitcast ptr %A to ptr, !dbg !49123  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %1, ptr align 16 @__const._Z10memcpyInitv.A, i64 16, i1 false), !dbg !49124; CHECK:       @llvm.memcpy{{.*}}, !DIAssignID ![[ID_3:[0-9]+]]125; CHECK-NEXT:  #dbg_assign(i1 poison, ![[VAR_1]], !DIExpression(), ![[ID_3]], ptr %1, !DIExpression(),126  %2 = bitcast ptr %A to ptr, !dbg !50127  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #5, !dbg !50128  ret void, !dbg !50129}130 131;; Assign to field of local variable.132;;133;;    void setField() {134;;      Outer O;135;;      O.A.B = Value;136;;    }137;;138;; Check that we get two dbg.assign intrinsics. The first linked to the alloca139;; and the second linked to the store to O.A.B, which should include the140;; appropriate fragment info (SizeInBits: 32, OffsetInBits: 32) with respect to141;; the base variable.142define dso_local void @_Z8setFieldv() #0 !dbg !51 {143; CHECK-LABEL: define dso_local void @_Z8setFieldv144entry:145  %O = alloca %struct.Outer, align 4146; CHECK:      %O = alloca %struct.Outer, align 4, !DIAssignID ![[ID_4:[0-9]+]]147; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_2:[0-9]+]], !DIExpression(), ![[ID_4]], ptr %O, !DIExpression(),148  %0 = bitcast ptr %O to ptr, !dbg !58149  call void @llvm.lifetime.start.p0(i64 16, ptr %0) #5, !dbg !58150  call void @llvm.dbg.declare(metadata ptr %O, metadata !53, metadata !DIExpression()), !dbg !59151  %1 = load i32, ptr @Value, align 4, !dbg !60, !tbaa !61152  %A = getelementptr inbounds %struct.Outer, ptr %O, i32 0, i32 0, !dbg !65153  %B = getelementptr inbounds %struct.Inner, ptr %A, i32 0, i32 1, !dbg !66154  store i32 %1, ptr %B, align 4, !dbg !67, !tbaa !68155; CHECK:      store i32 %1, ptr %B, align 4,{{.*}}!DIAssignID ![[ID_5:[0-9]+]]156; CHECK-NEXT: #dbg_assign(i32 %1, ![[VAR_2]], !DIExpression(DW_OP_LLVM_fragment, 32, 32), ![[ID_5]], ptr %B, !DIExpression(),157  %2 = bitcast ptr %O to ptr, !dbg !71158  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #5, !dbg !71159  ret void, !dbg !71160}161 162;; Assign to (statically) unknown offset into a local variable.163;;164;;   void unknownOffset() {165;;     int A[2];166;;     A[Index] = Value;167;;   }168;;169;; Check that we get only one dbg.assign intrinsic and that it is linked to the170;; alloca. The assignment doesn't get a dbg.assign intrinsic because we cannot171;; encode the fragment info for the assignment.172;; Note: This doesn't mean we lose the assignment entirely: the backend will173;; interpret the store (as it sees it) as an assignment.174define dso_local void @_Z13unknownOffsetv() #0 !dbg !72 {175; CHECK-LABEL: define dso_local void @_Z13unknownOffsetv176entry:177  %A = alloca [2 x i32], align 4178; CHECK:      %A = alloca [2 x i32], align 4, !DIAssignID ![[ID_6:[0-9]+]]179; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_3:[0-9]+]], !DIExpression(), ![[ID_6]], ptr %A, !DIExpression(),180  %0 = bitcast ptr %A to ptr, !dbg !78181  call void @llvm.lifetime.start.p0(i64 8, ptr %0) #5, !dbg !78182  call void @llvm.dbg.declare(metadata ptr %A, metadata !74, metadata !DIExpression()), !dbg !79183  %1 = load i32, ptr @Value, align 4, !dbg !80, !tbaa !61184  %2 = load i32, ptr @Index, align 4, !dbg !81, !tbaa !61185  %idxprom = sext i32 %2 to i64, !dbg !82186  %arrayidx = getelementptr inbounds [2 x i32], ptr %A, i64 0, i64 %idxprom, !dbg !82187  store i32 %1, ptr %arrayidx, align 4, !dbg !83, !tbaa !61188  %3 = bitcast ptr %A to ptr, !dbg !84189  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5, !dbg !84190  ret void, !dbg !84191}192 193;; Assignments to variables which share the same backing storage.194;;195;; Inner sharedAlloca() {196;;   if (Cond) {197;;     Inner A = InnerA;198;;     return A;199;;   } else {200;;     Inner B = InnerB;201;;     return B;202;;   }203;; }204;;205define dso_local i64 @_Z12sharedAllocav() #0 !dbg !85 {206; CHECK-LABEL: define dso_local i64 @_Z12sharedAllocav207entry:208  %retval = alloca %struct.Inner, align 4209; CHECK:      %retval = alloca %struct.Inner, align 4, !DIAssignID ![[ID_7:[0-9]+]]210; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_4:[0-9]+]], !DIExpression(), ![[ID_7]], ptr %retval, !DIExpression(),211; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_5:[0-9]+]], !DIExpression(), ![[ID_7]], ptr %retval, !DIExpression(),212  %0 = load i32, ptr @Cond, align 4, !dbg !94, !tbaa !61213  %tobool = icmp ne i32 %0, 0, !dbg !94214  br i1 %tobool, label %if.then, label %if.else, !dbg !95215 216if.then:                                          ; preds = %entry217; CHECK:      if.then:218  call void @llvm.dbg.declare(metadata ptr %retval, metadata !89, metadata !DIExpression()), !dbg !96219  %1 = bitcast ptr %retval to ptr, !dbg !97220  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %1, ptr align 4 @InnerA, i64 8, i1 false), !dbg !97, !tbaa.struct !98221; CHECK:      call void @llvm.memcpy{{.*}}, !DIAssignID ![[ID_8:[0-9]+]]222; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_4]], !DIExpression(), ![[ID_8]], ptr %1, !DIExpression(),223; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_5]], !DIExpression(), ![[ID_8]], ptr %1, !DIExpression(),224  br label %return, !dbg !99225 226if.else:                                          ; preds = %entry227; CHECK:      if.else:228  call void @llvm.dbg.declare(metadata ptr %retval, metadata !92, metadata !DIExpression()), !dbg !100229  %2 = bitcast ptr %retval to ptr, !dbg !101230  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 4 @InnerB, i64 8, i1 false), !dbg !101, !tbaa.struct !98231; CHECK:      call void @llvm.memcpy{{.*}}, !DIAssignID ![[ID_9:[0-9]+]]232; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_4]], !DIExpression(), ![[ID_9]], ptr %2, !DIExpression(),233; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_5]], !DIExpression(), ![[ID_9]], ptr %2, !DIExpression(),234  br label %return, !dbg !102235 236return:                                           ; preds = %if.else, %if.then237  %3 = bitcast ptr %retval to ptr, !dbg !103238  %4 = load i64, ptr %3, align 4, !dbg !103239  ret i64 %4, !dbg !103240}241 242;; Caller-allocated memory for a local (sret parameter).243;;244;;    Large sret() {245;;      Large X = L;246;;      return X;247;;    }248;;249;; TODO: Currently not supported by `trackAssignments` (or the rest of the250;; assignment tracking pipeline). In lieu of being able to xfail a part of a251;; test, check that the dbg.declare is preserved so the test fails (and can be252;; updated) when this is fixed.253define dso_local void @_Z4sretv(ptr noalias sret(%struct.Large) align 4 %agg.result) #0 !dbg !104 {254; CHECK-LABEL: define dso_local void @_Z4sretv255entry:256; CHECK: #dbg_declare257  call void @llvm.dbg.declare(metadata ptr %agg.result, metadata !108, metadata !DIExpression()), !dbg !109258  %0 = bitcast ptr %agg.result to ptr, !dbg !110259  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 4 @L, i64 40, i1 false), !dbg !110, !tbaa.struct !111260  ret void, !dbg !113261}262 263;; Caller-allocated memory for a local (byval parameter).264;;265;;    void byval(Large X) {}266;;267;; TODO: See comment for sret parameters above.268define dso_local void @_Z5byval5Large(ptr noundef byval(%struct.Large) align 8 %X) #0 !dbg !114 {269; CHECK-LABEL: define dso_local void @_Z5byval5Large270entry:271; CHECK: #dbg_declare272  call void @llvm.dbg.declare(metadata ptr %X, metadata !118, metadata !DIExpression()), !dbg !119273  ret void, !dbg !120274}275 276;; Caller-allocated memory for a local (sret parameter) with address stored to277;; local alloca.278;;279;;    LCopyCtor indirectReturn() {280;;      LCopyCtor R;281;;      return R;282;;    }283;;284;; A sret parameter is used here also, but in this case clang emits an alloca285;; to store the passed-in address for the storage for the variable. The286;; dbg.declare for the local R therefore requires a DW_OP_deref expression.287;; TODO: This isn't supported yet, so check the dbg.declare remains.288define dso_local void @_Z14indirectReturnv(ptr noalias sret(%struct.LCopyCtor) align 4 %agg.result) #0 !dbg !121 {289; CHECK-LABEL: define dso_local void @_Z14indirectReturnv290entry:291  %result.ptr = alloca ptr, align 8292  %0 = bitcast ptr %agg.result to ptr293  store ptr %0, ptr %result.ptr, align 8294  call void @llvm.dbg.declare(metadata ptr %result.ptr, metadata !126, metadata !DIExpression(DW_OP_deref)), !dbg !127295; CHECK: #dbg_declare296  call void @_ZN9LCopyCtorC1Ev(ptr noundef nonnull align 4 dereferenceable(16) %agg.result), !dbg !127297  ret void, !dbg !128298}299 300;; Inlined variable.301;;302;;    __attribute__((always_inline))303;;    int sqr(int Y) { return Y * Y;  }304;;    int fun(int X) { return sqr(X); }305;;306;; Check that dbg.assign intrinsics correctly inherit the !dbg attachment from307;; the dbg.declre.308define dso_local noundef i32 @_Z3funi(i32 noundef %X) !dbg !139 {309; CHECK-LABEL: define dso_local noundef i32 @_Z3funi310entry:311  %Y.addr.i = alloca i32, align 4312; CHECK:      %Y.addr.i = alloca i32, align 4, !DIAssignID ![[ID_10:[0-9]+]]313; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_6:[0-9]+]], !DIExpression(), ![[ID_10]], ptr %Y.addr.i, !DIExpression(), ![[DBG_0:[0-9]+]]314  %X.addr = alloca i32, align 4315; CHECK-NEXT: %X.addr = alloca i32, align 4, !DIAssignID ![[ID_11:[0-9]+]]316; CHECK-NEXT: #dbg_assign(i1 poison, ![[VAR_7:[0-9]+]], !DIExpression(), ![[ID_11]], ptr %X.addr, !DIExpression(), ![[DBG_1:[0-9]+]]317  store i32 %X, ptr %X.addr, align 4318; CHECK-NEXT: store i32 %X, ptr %X.addr, align 4, !DIAssignID ![[ID_12:[0-9]+]]319; CHECK-NEXT: #dbg_assign(i32 %X, ![[VAR_7]], !DIExpression(), ![[ID_12]], ptr %X.addr, !DIExpression(), ![[DBG_1]]320  call void @llvm.dbg.declare(metadata ptr %X.addr, metadata !140, metadata !DIExpression()), !dbg !141321  %0 = load i32, ptr %X.addr, align 4, !dbg !142322  store i32 %0, ptr %Y.addr.i, align 4323; CHECK:      store i32 %0, ptr %Y.addr.i, align 4, !DIAssignID ![[ID_13:[0-9]+]]324; CHECK-NEXT: #dbg_assign(i32 %0, ![[VAR_6]], !DIExpression(), ![[ID_13]], ptr %Y.addr.i, !DIExpression(), ![[DBG_0]]325  call void @llvm.dbg.declare(metadata ptr %Y.addr.i, metadata !133, metadata !DIExpression()), !dbg !143326  %1 = load i32, ptr %Y.addr.i, align 4, !dbg !145327  %2 = load i32, ptr %Y.addr.i, align 4, !dbg !146328  %mul.i = mul nsw i32 %1, %2, !dbg !147329  ret i32 %mul.i, !dbg !148330}331 332declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1333declare void @llvm.dbg.declare(metadata, metadata, metadata) #2334declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3335declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4336declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1337declare dso_local void @_ZN9LCopyCtorC1Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr338 339!llvm.dbg.cu = !{!2}340!llvm.module.flags = !{!26, !27, !28, !29, !1000}341!llvm.ident = !{!30}342 343; CHECK-DAG: ![[VAR_0]] = !DILocalVariable(name: "Z",344; CHECK-DAG: ![[VAR_1]] = !DILocalVariable(name: "A",345; CHECK-DAG: ![[VAR_2]] = !DILocalVariable(name: "O",346; CHECK-DAG: ![[VAR_3]] = !DILocalVariable(name: "A",347; CHECK-DAG: ![[VAR_4]] = !DILocalVariable(name: "B",348; CHECK-DAG: ![[VAR_5]] = !DILocalVariable(name: "A",349; CHECK-DAG: ![[VAR_6]] = !DILocalVariable(name: "Y", arg: 1, scope: ![[SQR:[0-9]+]],350; CHECK-DAG: ![[VAR_7]] = !DILocalVariable(name: "X", arg: 1, scope: ![[FUN:[0-9]+]],351; CHECK-DAG: ![[SQR]] = distinct !DISubprogram(name: "sqr",352; CHECK-DAG: ![[FUN]] = distinct !DISubprogram(name: "fun",353; CHECK-DAG: ![[DBG_0]] = !DILocation(line: 0, scope: ![[SQR]], inlinedAt: ![[SQR_INLINE_SITE:[0-9]+]])354; CHECK-DAG: [[SQR_INLINE_SITE]] = distinct !DILocation(line: 3, column: 25, scope: ![[FUN]])355; CHECK-DAG: ![[DBG_1]] = !DILocation(line: 0, scope: ![[FUN]])356 357!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())358!1 = distinct !DIGlobalVariable(name: "Value", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)359!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)360!3 = !DIFile(filename: "test.cpp", directory: "/")361!4 = !{!0, !5, !8, !10, !16, !18}362!5 = !DIGlobalVariableExpression(var: !6, expr: !DIExpression())363!6 = distinct !DIGlobalVariable(name: "Index", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)364!7 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)365!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression())366!9 = distinct !DIGlobalVariable(name: "Cond", scope: !2, file: !3, line: 5, type: !7, isLocal: false, isDefinition: true)367!10 = !DIGlobalVariableExpression(var: !11, expr: !DIExpression())368!11 = distinct !DIGlobalVariable(name: "InnerA", scope: !2, file: !3, line: 6, type: !12, isLocal: false, isDefinition: true)369!12 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Inner", file: !3, line: 1, size: 64, flags: DIFlagTypePassByValue, elements: !13, identifier: "_ZTS5Inner")370!13 = !{!14, !15}371!14 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !12, file: !3, line: 1, baseType: !7, size: 32)372!15 = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !12, file: !3, line: 1, baseType: !7, size: 32, offset: 32)373!16 = !DIGlobalVariableExpression(var: !17, expr: !DIExpression())374!17 = distinct !DIGlobalVariable(name: "InnerB", scope: !2, file: !3, line: 6, type: !12, isLocal: false, isDefinition: true)375!18 = !DIGlobalVariableExpression(var: !19, expr: !DIExpression())376!19 = distinct !DIGlobalVariable(name: "L", scope: !2, file: !3, line: 7, type: !20, isLocal: false, isDefinition: true)377!20 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Large", file: !3, line: 3, size: 320, flags: DIFlagTypePassByValue, elements: !21, identifier: "_ZTS5Large")378!21 = !{!22}379!22 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !20, file: !3, line: 3, baseType: !23, size: 320)380!23 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 320, elements: !24)381!24 = !{!25}382!25 = !DISubrange(count: 10)383!26 = !{i32 7, !"Dwarf Version", i32 5}384!27 = !{i32 2, !"Debug Info Version", i32 3}385!28 = !{i32 1, !"wchar_size", i32 4}386!29 = !{i32 7, !"uwtable", i32 1}387!30 = !{!"clang version 14.0.0"}388!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)389!32 = !DISubroutineType(types: !33)390!33 = !{null}391!34 = !{!35}392!35 = !DILocalVariable(name: "Z", scope: !31, file: !3, line: 9, type: !36)393!36 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 96, elements: !37)394!37 = !{!38}395!38 = !DISubrange(count: 3)396!39 = !DILocation(line: 9, column: 19, scope: !31)397!40 = !DILocation(line: 9, column: 23, scope: !31)398!41 = !DILocation(line: 9, column: 41, scope: !31)399!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)400!43 = !{!44}401!44 = !DILocalVariable(name: "A", scope: !42, file: !3, line: 11, type: !45)402!45 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 128, elements: !46)403!46 = !{!47}404!47 = !DISubrange(count: 4)405!48 = !DILocation(line: 11, column: 21, scope: !42)406!49 = !DILocation(line: 11, column: 25, scope: !42)407!50 = !DILocation(line: 11, column: 46, scope: !42)408!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)409!52 = !{!53}410!53 = !DILocalVariable(name: "O", scope: !51, file: !3, line: 14, type: !54)411!54 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Outer", file: !3, line: 2, size: 128, flags: DIFlagTypePassByValue, elements: !55, identifier: "_ZTS5Outer")412!55 = !{!56, !57}413!56 = !DIDerivedType(tag: DW_TAG_member, name: "A", scope: !54, file: !3, line: 2, baseType: !12, size: 64)414!57 = !DIDerivedType(tag: DW_TAG_member, name: "B", scope: !54, file: !3, line: 2, baseType: !12, size: 64, offset: 64)415!58 = !DILocation(line: 14, column: 3, scope: !51)416!59 = !DILocation(line: 14, column: 9, scope: !51)417!60 = !DILocation(line: 15, column: 11, scope: !51)418!61 = !{!62, !62, i64 0}419!62 = !{!"int", !63, i64 0}420!63 = !{!"omnipotent char", !64, i64 0}421!64 = !{!"Simple C++ TBAA"}422!65 = !DILocation(line: 15, column: 5, scope: !51)423!66 = !DILocation(line: 15, column: 7, scope: !51)424!67 = !DILocation(line: 15, column: 9, scope: !51)425!68 = !{!69, !62, i64 4}426!69 = !{!"_ZTS5Outer", !70, i64 0, !70, i64 8}427!70 = !{!"_ZTS5Inner", !62, i64 0, !62, i64 4}428!71 = !DILocation(line: 16, column: 1, scope: !51)429!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)430!73 = !{!74}431!74 = !DILocalVariable(name: "A", scope: !72, file: !3, line: 19, type: !75)432!75 = !DICompositeType(tag: DW_TAG_array_type, baseType: !7, size: 64, elements: !76)433!76 = !{!77}434!77 = !DISubrange(count: 2)435!78 = !DILocation(line: 19, column: 3, scope: !72)436!79 = !DILocation(line: 19, column: 7, scope: !72)437!80 = !DILocation(line: 20, column: 14, scope: !72)438!81 = !DILocation(line: 20, column: 5, scope: !72)439!82 = !DILocation(line: 20, column: 3, scope: !72)440!83 = !DILocation(line: 20, column: 12, scope: !72)441!84 = !DILocation(line: 21, column: 1, scope: !72)442!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)443!86 = !DISubroutineType(types: !87)444!87 = !{!12}445!88 = !{!89, !92}446!89 = !DILocalVariable(name: "A", scope: !90, file: !3, line: 25, type: !12)447!90 = distinct !DILexicalBlock(scope: !91, file: !3, line: 24, column: 13)448!91 = distinct !DILexicalBlock(scope: !85, file: !3, line: 24, column: 7)449!92 = !DILocalVariable(name: "B", scope: !93, file: !3, line: 28, type: !12)450!93 = distinct !DILexicalBlock(scope: !91, file: !3, line: 27, column: 10)451!94 = !DILocation(line: 24, column: 7, scope: !91)452!95 = !DILocation(line: 24, column: 7, scope: !85)453!96 = !DILocation(line: 25, column: 11, scope: !90)454!97 = !DILocation(line: 25, column: 15, scope: !90)455!98 = !{i64 0, i64 4, !61, i64 4, i64 4, !61}456!99 = !DILocation(line: 26, column: 5, scope: !90)457!100 = !DILocation(line: 28, column: 11, scope: !93)458!101 = !DILocation(line: 28, column: 15, scope: !93)459!102 = !DILocation(line: 29, column: 5, scope: !93)460!103 = !DILocation(line: 31, column: 1, scope: !85)461!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)462!105 = !DISubroutineType(types: !106)463!106 = !{!20}464!107 = !{!108}465!108 = !DILocalVariable(name: "X", scope: !104, file: !3, line: 34, type: !20)466!109 = !DILocation(line: 34, column: 9, scope: !104)467!110 = !DILocation(line: 34, column: 13, scope: !104)468!111 = !{i64 0, i64 40, !112}469!112 = !{!63, !63, i64 0}470!113 = !DILocation(line: 35, column: 3, scope: !104)471!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)472!115 = !DISubroutineType(types: !116)473!116 = !{null, !20}474!117 = !{!118}475!118 = !DILocalVariable(name: "X", arg: 1, scope: !114, file: !3, line: 38, type: !20)476!119 = !DILocation(line: 38, column: 18, scope: !114)477!120 = !DILocation(line: 38, column: 22, scope: !114)478!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)479!122 = !DISubroutineType(types: !123)480!123 = !{!124}481!124 = !DICompositeType(tag: DW_TAG_structure_type, name: "LCopyCtor", file: !3, line: 4, size: 128, flags: DIFlagFwdDecl | DIFlagNonTrivial, identifier: "_ZTS9LCopyCtor")482!125 = !{}483!126 = !DILocalVariable(name: "R", scope: !121, file: !3, line: 42, type: !124)484!127 = !DILocation(line: 42, column: 13, scope: !121)485!128 = !DILocation(line: 43, column: 3, scope: !121)486!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)487!130 = !DISubroutineType(types: !131)488!131 = !{!7, !7}489!132 = !{}490!133 = !DILocalVariable(name: "Y", arg: 1, scope: !129, file: !3, line: 2, type: !7)491!134 = !DILocation(line: 2, column: 13, scope: !129)492!135 = !DILocation(line: 2, column: 25, scope: !129)493!136 = !DILocation(line: 2, column: 29, scope: !129)494!137 = !DILocation(line: 2, column: 27, scope: !129)495!138 = !DILocation(line: 2, column: 18, scope: !129)496!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)497!140 = !DILocalVariable(name: "X", arg: 1, scope: !139, file: !3, line: 3, type: !7)498!141 = !DILocation(line: 3, column: 13, scope: !139)499!142 = !DILocation(line: 3, column: 29, scope: !139)500!143 = !DILocation(line: 2, column: 13, scope: !129, inlinedAt: !144)501!144 = distinct !DILocation(line: 3, column: 25, scope: !139)502!145 = !DILocation(line: 2, column: 25, scope: !129, inlinedAt: !144)503!146 = !DILocation(line: 2, column: 29, scope: !129, inlinedAt: !144)504!147 = !DILocation(line: 2, column: 27, scope: !129, inlinedAt: !144)505!148 = !DILocation(line: 3, column: 18, scope: !139)506!1000 = !{i32 7, !"debug-info-assignment-tracking", i1 true}507