From 0f5ebf608fbf990943d6ea3de2ebec46bfe05349 Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Sat, 1 Jun 2024 21:16:28 +0200 Subject: [PATCH] Add cache for CompositeDITypes to fix problem with recursive DIType lookup --- .run/spice.run.xml | 2 +- src/irgenerator/DebugInfoGenerator.cpp | 29 +- src/irgenerator/DebugInfoGenerator.h | 3 +- src/symboltablebuilder/Type.cpp | 6 +- src/symboltablebuilder/Type.h | 5 +- std/type/common.spice | 16 +- .../success-dbg-info-complex/ir-code.ll | 643 +++++++++--------- .../success-dbg-info-simple/ir-code.ll | 192 ++---- 8 files changed, 439 insertions(+), 457 deletions(-) diff --git a/.run/spice.run.xml b/.run/spice.run.xml index d00bf8119..027dc5dd3 100644 --- a/.run/spice.run.xml +++ b/.run/spice.run.xml @@ -1,5 +1,5 @@ - + diff --git a/src/irgenerator/DebugInfoGenerator.cpp b/src/irgenerator/DebugInfoGenerator.cpp index 1d591e711..9fc57c5d5 100644 --- a/src/irgenerator/DebugInfoGenerator.cpp +++ b/src/irgenerator/DebugInfoGenerator.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -277,20 +278,20 @@ void DebugInfoGenerator::finalize() { diBuilder->finalize(); } -llvm::DIType *DebugInfoGenerator::getDITypeForQualType(const ASTNode *node, const QualType &ty) const { // NOLINT(*-no-recursion) - // Pointer ty +llvm::DIType *DebugInfoGenerator::getDITypeForQualType(const ASTNode *node, const QualType &ty) { // NOLINT(*-no-recursion) + // Pointer type if (ty.isPtr()) { llvm::DIType *pointeeTy = getDITypeForQualType(node, ty.getContained()); return diBuilder->createPointerType(pointeeTy, pointerWidth); } - // Reference ty + // Reference type if (ty.isRef()) { llvm::DIType *referencedType = getDITypeForQualType(node, ty.getContained()); return diBuilder->createReferenceType(llvm::dwarf::DW_TAG_reference_type, referencedType, pointerWidth); } - // Array ty + // Array type if (ty.isArray()) { llvm::DIType *itemTy = getDITypeForQualType(node, ty.getContained()); const size_t size = ty.getArraySize(); @@ -326,6 +327,12 @@ llvm::DIType *DebugInfoGenerator::getDITypeForQualType(const ASTNode *node, cons baseDiType = boolTy; break; case TY_STRUCT: { + // Do cache lookup + const size_t hashKey = std::hash{}(ty); + if (structTypeCache.contains(hashKey)) + return structTypeCache.at(hashKey); + + // Cache miss, generate struct type Struct *spiceStruct = ty.getStruct(node); assert(spiceStruct != nullptr); @@ -344,6 +351,9 @@ llvm::DIType *DebugInfoGenerator::getDITypeForQualType(const ASTNode *node, cons llvm::DINode::FlagTypePassByReference | llvm::DINode::FlagNonTrivial, nullptr, {}, 0, nullptr, mangledName); baseDiType = structDiType; + // Insert into cache + structTypeCache.insert({hashKey, structDiType}); + // Collect DI types for fields std::vector fieldTypes; for (size_t i = 0; i < spiceStruct->scope->getFieldCount(); i++) { @@ -369,6 +379,12 @@ llvm::DIType *DebugInfoGenerator::getDITypeForQualType(const ASTNode *node, cons break; } case TY_INTERFACE: { + // Do cache lookup + const size_t hashKey = std::hash{}(ty); + if (structTypeCache.contains(hashKey)) + return structTypeCache.at(hashKey); + + // Cache miss, generate interface type Interface *spiceInterface = ty.getInterface(node); assert(spiceInterface != nullptr); @@ -388,8 +404,11 @@ llvm::DIType *DebugInfoGenerator::getDITypeForQualType(const ASTNode *node, cons // Set vtable holder to itself for interfaces interfaceDiType->replaceVTableHolder(interfaceDiType); - baseDiType = interfaceDiType; + + // Insert into cache + structTypeCache.insert({hashKey, interfaceDiType}); + break; } case TY_FUNCTION: // fall-through diff --git a/src/irgenerator/DebugInfoGenerator.h b/src/irgenerator/DebugInfoGenerator.h index 3070cd804..5f72cb53d 100644 --- a/src/irgenerator/DebugInfoGenerator.h +++ b/src/irgenerator/DebugInfoGenerator.h @@ -45,6 +45,7 @@ class DebugInfoGenerator { llvm::DICompileUnit *compileUnit = nullptr; llvm::DIFile *diFile = nullptr; std::stack lexicalBlocks; + std::unordered_map structTypeCache; unsigned int pointerWidth = 0; // Debug types llvm::DIType *doubleTy = nullptr; @@ -62,7 +63,7 @@ class DebugInfoGenerator { llvm::DICompositeType *fatPtrTy = nullptr; // Private methods - [[nodiscard]] llvm::DIType *getDITypeForQualType(const ASTNode *node, const QualType &ty) const; + [[nodiscard]] llvm::DIType *getDITypeForQualType(const ASTNode *node, const QualType &ty); }; } // namespace spice::compiler \ No newline at end of file diff --git a/src/symboltablebuilder/Type.cpp b/src/symboltablebuilder/Type.cpp index 12a063e5f..35d0b970b 100644 --- a/src/symboltablebuilder/Type.cpp +++ b/src/symboltablebuilder/Type.cpp @@ -2,19 +2,19 @@ #include "Type.h" +#include + #include #include #include #include #include #include -#include -#include #include #include #include -#include +#include namespace spice::compiler { diff --git a/src/symboltablebuilder/Type.h b/src/symboltablebuilder/Type.h index f7150455e..e48ff1ae6 100644 --- a/src/symboltablebuilder/Type.h +++ b/src/symboltablebuilder/Type.h @@ -10,7 +10,10 @@ #include #include -#include +// LLVM forward declarations +namespace llvm { +class Type; +} // namespace llvm namespace spice::compiler { diff --git a/std/type/common.spice b/std/type/common.spice index b9604f2ae..2847151a2 100644 --- a/std/type/common.spice +++ b/std/type/common.spice @@ -1,2 +1,16 @@ // Common type aliases -type Size alias long; \ No newline at end of file +public type Size alias unsigned long; +public type PtrDiff alias unsigned long; + +// Integer type aliases +public type I8 alias unsigned signed byte; +public type U8 alias unsigned unsigned byte; +public type I16 alias unsigned signed short; +public type U16 alias unsigned unsigned short; +public type I32 alias unsigned signed int; +public type U32 alias unsigned unsigned int; +public type I64 alias unsigned signed long; +public type U64 alias unsigned unsigned long; + +// Floating point type aliases +public type F64 alias double; \ No newline at end of file diff --git a/test/test-files/irgenerator/debug-info/success-dbg-info-complex/ir-code.ll b/test/test-files/irgenerator/debug-info/success-dbg-info-complex/ir-code.ll index 22d834a75..636f8270c 100644 --- a/test/test-files/irgenerator/debug-info/success-dbg-info-complex/ir-code.ll +++ b/test/test-files/irgenerator/debug-info/success-dbg-info-complex/ir-code.ll @@ -84,363 +84,363 @@ assert.then.L10: ; preds = %2 assert.exit.L10: ; preds = %2 %18 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !43 - call void @llvm.dbg.declare(metadata ptr %it, metadata !44, metadata !DIExpression()), !dbg !55 + call void @llvm.dbg.declare(metadata ptr %it, metadata !44, metadata !DIExpression()), !dbg !50 store %struct.VectorIterator %18, ptr %it, align 8, !dbg !43 - %19 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !56 - br i1 %19, label %assert.exit.L14, label %assert.then.L14, !dbg !56, !prof !42 + %19 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !51 + br i1 %19, label %assert.exit.L14, label %assert.then.L14, !dbg !51, !prof !42 assert.then.L14: ; preds = %assert.exit.L10 - %20 = call i32 (ptr, ...) @printf(ptr @anon.string.1), !dbg !56 - call void @exit(i32 1), !dbg !56 - unreachable, !dbg !56 + %20 = call i32 (ptr, ...) @printf(ptr @anon.string.1), !dbg !51 + call void @exit(i32 1), !dbg !51 + unreachable, !dbg !51 assert.exit.L14: ; preds = %assert.exit.L10 - %21 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !57 - %22 = load i32, ptr %21, align 4, !dbg !58 - %23 = icmp eq i32 %22, 123, !dbg !58 - br i1 %23, label %assert.exit.L15, label %assert.then.L15, !dbg !58, !prof !42 + %21 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !52 + %22 = load i32, ptr %21, align 4, !dbg !53 + %23 = icmp eq i32 %22, 123, !dbg !53 + br i1 %23, label %assert.exit.L15, label %assert.then.L15, !dbg !53, !prof !42 assert.then.L15: ; preds = %assert.exit.L14 - %24 = call i32 (ptr, ...) @printf(ptr @anon.string.2), !dbg !58 - call void @exit(i32 1), !dbg !58 - unreachable, !dbg !58 + %24 = call i32 (ptr, ...) @printf(ptr @anon.string.2), !dbg !53 + call void @exit(i32 1), !dbg !53 + unreachable, !dbg !53 assert.exit.L15: ; preds = %assert.exit.L14 - %25 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !59 - %26 = load i32, ptr %25, align 4, !dbg !60 - %27 = icmp eq i32 %26, 123, !dbg !60 - br i1 %27, label %assert.exit.L16, label %assert.then.L16, !dbg !60, !prof !42 + %25 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !54 + %26 = load i32, ptr %25, align 4, !dbg !55 + %27 = icmp eq i32 %26, 123, !dbg !55 + br i1 %27, label %assert.exit.L16, label %assert.then.L16, !dbg !55, !prof !42 assert.then.L16: ; preds = %assert.exit.L15 - %28 = call i32 (ptr, ...) @printf(ptr @anon.string.3), !dbg !60 - call void @exit(i32 1), !dbg !60 - unreachable, !dbg !60 + %28 = call i32 (ptr, ...) @printf(ptr @anon.string.3), !dbg !55 + call void @exit(i32 1), !dbg !55 + unreachable, !dbg !55 assert.exit.L16: ; preds = %assert.exit.L15 - call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !61 - %29 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !62 - %30 = load i32, ptr %29, align 4, !dbg !63 - %31 = icmp eq i32 %30, 4321, !dbg !63 - br i1 %31, label %assert.exit.L18, label %assert.then.L18, !dbg !63, !prof !42 + call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !56 + %29 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !57 + %30 = load i32, ptr %29, align 4, !dbg !58 + %31 = icmp eq i32 %30, 4321, !dbg !58 + br i1 %31, label %assert.exit.L18, label %assert.then.L18, !dbg !58, !prof !42 assert.then.L18: ; preds = %assert.exit.L16 - %32 = call i32 (ptr, ...) @printf(ptr @anon.string.4), !dbg !63 - call void @exit(i32 1), !dbg !63 - unreachable, !dbg !63 + %32 = call i32 (ptr, ...) @printf(ptr @anon.string.4), !dbg !58 + call void @exit(i32 1), !dbg !58 + unreachable, !dbg !58 assert.exit.L18: ; preds = %assert.exit.L16 - %33 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !64 - br i1 %33, label %assert.exit.L19, label %assert.then.L19, !dbg !64, !prof !42 + %33 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !59 + br i1 %33, label %assert.exit.L19, label %assert.then.L19, !dbg !59, !prof !42 assert.then.L19: ; preds = %assert.exit.L18 - %34 = call i32 (ptr, ...) @printf(ptr @anon.string.5), !dbg !64 - call void @exit(i32 1), !dbg !64 - unreachable, !dbg !64 + %34 = call i32 (ptr, ...) @printf(ptr @anon.string.5), !dbg !59 + call void @exit(i32 1), !dbg !59 + unreachable, !dbg !59 assert.exit.L19: ; preds = %assert.exit.L18 - call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !65 - %35 = call %struct.Pair @_ZN14VectorIteratorIiE6getIdxEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !66 - call void @llvm.dbg.declare(metadata ptr %pair, metadata !67, metadata !DIExpression()), !dbg !73 - store %struct.Pair %35, ptr %pair, align 8, !dbg !66 - %36 = call ptr @_ZN4PairImRiE8getFirstEv(ptr noundef nonnull align 8 dereferenceable(16) %pair), !dbg !74 - %37 = load i64, ptr %36, align 8, !dbg !75 - %38 = icmp eq i64 %37, 2, !dbg !75 - br i1 %38, label %assert.exit.L22, label %assert.then.L22, !dbg !75, !prof !42 + call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !60 + %35 = call %struct.Pair @_ZN14VectorIteratorIiE6getIdxEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !61 + call void @llvm.dbg.declare(metadata ptr %pair, metadata !62, metadata !DIExpression()), !dbg !68 + store %struct.Pair %35, ptr %pair, align 8, !dbg !61 + %36 = call ptr @_ZN4PairImRiE8getFirstEv(ptr noundef nonnull align 8 dereferenceable(16) %pair), !dbg !69 + %37 = load i64, ptr %36, align 8, !dbg !70 + %38 = icmp eq i64 %37, 2, !dbg !70 + br i1 %38, label %assert.exit.L22, label %assert.then.L22, !dbg !70, !prof !42 assert.then.L22: ; preds = %assert.exit.L19 - %39 = call i32 (ptr, ...) @printf(ptr @anon.string.6), !dbg !75 - call void @exit(i32 1), !dbg !75 - unreachable, !dbg !75 + %39 = call i32 (ptr, ...) @printf(ptr @anon.string.6), !dbg !70 + call void @exit(i32 1), !dbg !70 + unreachable, !dbg !70 assert.exit.L22: ; preds = %assert.exit.L19 - %40 = call ptr @_ZN4PairImRiE9getSecondEv(ptr noundef nonnull align 8 dereferenceable(16) %pair), !dbg !76 - %41 = load i32, ptr %40, align 4, !dbg !77 - %42 = icmp eq i32 %41, 9876, !dbg !77 - br i1 %42, label %assert.exit.L23, label %assert.then.L23, !dbg !77, !prof !42 + %40 = call ptr @_ZN4PairImRiE9getSecondEv(ptr noundef nonnull align 8 dereferenceable(16) %pair), !dbg !71 + %41 = load i32, ptr %40, align 4, !dbg !72 + %42 = icmp eq i32 %41, 9876, !dbg !72 + br i1 %42, label %assert.exit.L23, label %assert.then.L23, !dbg !72, !prof !42 assert.then.L23: ; preds = %assert.exit.L22 - %43 = call i32 (ptr, ...) @printf(ptr @anon.string.7), !dbg !77 - call void @exit(i32 1), !dbg !77 - unreachable, !dbg !77 + %43 = call i32 (ptr, ...) @printf(ptr @anon.string.7), !dbg !72 + call void @exit(i32 1), !dbg !72 + unreachable, !dbg !72 assert.exit.L23: ; preds = %assert.exit.L22 - call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !78 - %44 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !79 - %45 = xor i1 %44, true, !dbg !79 - store i1 %45, ptr %6, align 1, !dbg !79 - br i1 %45, label %assert.exit.L25, label %assert.then.L25, !dbg !79, !prof !42 + call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !73 + %44 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !74 + %45 = xor i1 %44, true, !dbg !74 + store i1 %45, ptr %6, align 1, !dbg !74 + br i1 %45, label %assert.exit.L25, label %assert.then.L25, !dbg !74, !prof !42 assert.then.L25: ; preds = %assert.exit.L23 - %46 = call i32 (ptr, ...) @printf(ptr @anon.string.8), !dbg !79 - call void @exit(i32 1), !dbg !79 - unreachable, !dbg !79 + %46 = call i32 (ptr, ...) @printf(ptr @anon.string.8), !dbg !74 + call void @exit(i32 1), !dbg !74 + unreachable, !dbg !74 assert.exit.L25: ; preds = %assert.exit.L23 - store i32 321, ptr %7, align 4, !dbg !80 - call void @_ZN6VectorIiE8pushBackERKi(ptr noundef nonnull align 8 dereferenceable(32) %vi, ptr %7), !dbg !80 - store i32 -99, ptr %8, align 4, !dbg !81 - call void @_ZN6VectorIiE8pushBackERKi(ptr noundef nonnull align 8 dereferenceable(32) %vi, ptr %8), !dbg !81 - %47 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !82 - br i1 %47, label %assert.exit.L30, label %assert.then.L30, !dbg !82, !prof !42 + store i32 321, ptr %7, align 4, !dbg !75 + call void @_ZN6VectorIiE8pushBackERKi(ptr noundef nonnull align 8 dereferenceable(32) %vi, ptr %7), !dbg !75 + store i32 -99, ptr %8, align 4, !dbg !76 + call void @_ZN6VectorIiE8pushBackERKi(ptr noundef nonnull align 8 dereferenceable(32) %vi, ptr %8), !dbg !76 + %47 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !77 + br i1 %47, label %assert.exit.L30, label %assert.then.L30, !dbg !77, !prof !42 assert.then.L30: ; preds = %assert.exit.L25 - %48 = call i32 (ptr, ...) @printf(ptr @anon.string.9), !dbg !82 - call void @exit(i32 1), !dbg !82 - unreachable, !dbg !82 + %48 = call i32 (ptr, ...) @printf(ptr @anon.string.9), !dbg !77 + call void @exit(i32 1), !dbg !77 + unreachable, !dbg !77 assert.exit.L30: ; preds = %assert.exit.L25 - call void @_Z13op.minusequalIiiEvR14VectorIteratorIiEi(ptr %it, i32 3), !dbg !83 - %49 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !84 - %50 = load i32, ptr %49, align 4, !dbg !85 - %51 = icmp eq i32 %50, 123, !dbg !85 - br i1 %51, label %assert.exit.L34, label %assert.then.L34, !dbg !85, !prof !42 + call void @_Z13op.minusequalIiiEvR14VectorIteratorIiEi(ptr %it, i32 3), !dbg !78 + %49 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !79 + %50 = load i32, ptr %49, align 4, !dbg !80 + %51 = icmp eq i32 %50, 123, !dbg !80 + br i1 %51, label %assert.exit.L34, label %assert.then.L34, !dbg !80, !prof !42 assert.then.L34: ; preds = %assert.exit.L30 - %52 = call i32 (ptr, ...) @printf(ptr @anon.string.10), !dbg !85 - call void @exit(i32 1), !dbg !85 - unreachable, !dbg !85 + %52 = call i32 (ptr, ...) @printf(ptr @anon.string.10), !dbg !80 + call void @exit(i32 1), !dbg !80 + unreachable, !dbg !80 assert.exit.L34: ; preds = %assert.exit.L30 - %53 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !86 - br i1 %53, label %assert.exit.L35, label %assert.then.L35, !dbg !86, !prof !42 + %53 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !81 + br i1 %53, label %assert.exit.L35, label %assert.then.L35, !dbg !81, !prof !42 assert.then.L35: ; preds = %assert.exit.L34 - %54 = call i32 (ptr, ...) @printf(ptr @anon.string.11), !dbg !86 - call void @exit(i32 1), !dbg !86 - unreachable, !dbg !86 + %54 = call i32 (ptr, ...) @printf(ptr @anon.string.11), !dbg !81 + call void @exit(i32 1), !dbg !81 + unreachable, !dbg !81 assert.exit.L35: ; preds = %assert.exit.L34 - %55 = load %struct.VectorIterator, ptr %it, align 8, !dbg !87 - call void @_Z16op.plusplus.postIiEvR14VectorIteratorIiE(ptr %it), !dbg !87 - %56 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !88 - %57 = load i32, ptr %56, align 4, !dbg !89 - %58 = icmp eq i32 %57, 4321, !dbg !89 - br i1 %58, label %assert.exit.L37, label %assert.then.L37, !dbg !89, !prof !42 + %55 = load %struct.VectorIterator, ptr %it, align 8, !dbg !82 + call void @_Z16op.plusplus.postIiEvR14VectorIteratorIiE(ptr %it), !dbg !82 + %56 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !83 + %57 = load i32, ptr %56, align 4, !dbg !84 + %58 = icmp eq i32 %57, 4321, !dbg !84 + br i1 %58, label %assert.exit.L37, label %assert.then.L37, !dbg !84, !prof !42 assert.then.L37: ; preds = %assert.exit.L35 - %59 = call i32 (ptr, ...) @printf(ptr @anon.string.12), !dbg !89 - call void @exit(i32 1), !dbg !89 - unreachable, !dbg !89 + %59 = call i32 (ptr, ...) @printf(ptr @anon.string.12), !dbg !84 + call void @exit(i32 1), !dbg !84 + unreachable, !dbg !84 assert.exit.L37: ; preds = %assert.exit.L35 - %60 = load %struct.VectorIterator, ptr %it, align 8, !dbg !90 - call void @_Z18op.minusminus.postIiEvR14VectorIteratorIiE(ptr %it), !dbg !90 - %61 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !91 - %62 = load i32, ptr %61, align 4, !dbg !92 - %63 = icmp eq i32 %62, 123, !dbg !92 - br i1 %63, label %assert.exit.L39, label %assert.then.L39, !dbg !92, !prof !42 + %60 = load %struct.VectorIterator, ptr %it, align 8, !dbg !85 + call void @_Z18op.minusminus.postIiEvR14VectorIteratorIiE(ptr %it), !dbg !85 + %61 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !86 + %62 = load i32, ptr %61, align 4, !dbg !87 + %63 = icmp eq i32 %62, 123, !dbg !87 + br i1 %63, label %assert.exit.L39, label %assert.then.L39, !dbg !87, !prof !42 assert.then.L39: ; preds = %assert.exit.L37 - %64 = call i32 (ptr, ...) @printf(ptr @anon.string.13), !dbg !92 - call void @exit(i32 1), !dbg !92 - unreachable, !dbg !92 + %64 = call i32 (ptr, ...) @printf(ptr @anon.string.13), !dbg !87 + call void @exit(i32 1), !dbg !87 + unreachable, !dbg !87 assert.exit.L39: ; preds = %assert.exit.L37 - call void @_Z12op.plusequalIiiEvR14VectorIteratorIiEi(ptr %it, i32 4), !dbg !93 - %65 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !94 - %66 = load i32, ptr %65, align 4, !dbg !95 - %67 = icmp eq i32 %66, -99, !dbg !95 - br i1 %67, label %assert.exit.L41, label %assert.then.L41, !dbg !95, !prof !42 + call void @_Z12op.plusequalIiiEvR14VectorIteratorIiEi(ptr %it, i32 4), !dbg !88 + %65 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !89 + %66 = load i32, ptr %65, align 4, !dbg !90 + %67 = icmp eq i32 %66, -99, !dbg !90 + br i1 %67, label %assert.exit.L41, label %assert.then.L41, !dbg !90, !prof !42 assert.then.L41: ; preds = %assert.exit.L39 - %68 = call i32 (ptr, ...) @printf(ptr @anon.string.14), !dbg !95 - call void @exit(i32 1), !dbg !95 - unreachable, !dbg !95 + %68 = call i32 (ptr, ...) @printf(ptr @anon.string.14), !dbg !90 + call void @exit(i32 1), !dbg !90 + unreachable, !dbg !90 assert.exit.L41: ; preds = %assert.exit.L39 - call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !96 - %69 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !97 - %70 = xor i1 %69, true, !dbg !97 - store i1 %70, ptr %9, align 1, !dbg !97 - br i1 %70, label %assert.exit.L43, label %assert.then.L43, !dbg !97, !prof !42 + call void @_ZN14VectorIteratorIiE4nextEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !91 + %69 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr noundef nonnull align 8 dereferenceable(24) %it), !dbg !92 + %70 = xor i1 %69, true, !dbg !92 + store i1 %70, ptr %9, align 1, !dbg !92 + br i1 %70, label %assert.exit.L43, label %assert.then.L43, !dbg !92, !prof !42 assert.then.L43: ; preds = %assert.exit.L41 - %71 = call i32 (ptr, ...) @printf(ptr @anon.string.15), !dbg !97 - call void @exit(i32 1), !dbg !97 - unreachable, !dbg !97 + %71 = call i32 (ptr, ...) @printf(ptr @anon.string.15), !dbg !92 + call void @exit(i32 1), !dbg !92 + unreachable, !dbg !92 assert.exit.L43: ; preds = %assert.exit.L41 - %72 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !98 - call void @llvm.dbg.declare(metadata ptr %item, metadata !100, metadata !DIExpression()), !dbg !101 - store %struct.VectorIterator %72, ptr %10, align 8, !dbg !98 - br label %foreach.head.L46, !dbg !101 + %72 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !93 + call void @llvm.dbg.declare(metadata ptr %item, metadata !95, metadata !DIExpression()), !dbg !96 + store %struct.VectorIterator %72, ptr %10, align 8, !dbg !93 + br label %foreach.head.L46, !dbg !96 foreach.head.L46: ; preds = %foreach.tail.L46, %assert.exit.L43 - %73 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr %10), !dbg !101 - br i1 %73, label %foreach.body.L46, label %foreach.exit.L46, !dbg !101 + %73 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr %10), !dbg !96 + br i1 %73, label %foreach.body.L46, label %foreach.exit.L46, !dbg !96 foreach.body.L46: ; preds = %foreach.head.L46 - %74 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr %10), !dbg !101 - %75 = load i32, ptr %74, align 4, !dbg !101 - store i32 %75, ptr %item, align 4, !dbg !101 - %76 = load i32, ptr %item, align 4, !dbg !102 - %77 = add nsw i32 %76, 1, !dbg !102 - store i32 %77, ptr %item, align 4, !dbg !102 - br label %foreach.tail.L46, !dbg !102 + %74 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr %10), !dbg !96 + %75 = load i32, ptr %74, align 4, !dbg !96 + store i32 %75, ptr %item, align 4, !dbg !96 + %76 = load i32, ptr %item, align 4, !dbg !97 + %77 = add nsw i32 %76, 1, !dbg !97 + store i32 %77, ptr %item, align 4, !dbg !97 + br label %foreach.tail.L46, !dbg !97 foreach.tail.L46: ; preds = %foreach.body.L46 - call void @_ZN14VectorIteratorIiE4nextEv(ptr %10), !dbg !102 - br label %foreach.head.L46, !dbg !102 + call void @_ZN14VectorIteratorIiE4nextEv(ptr %10), !dbg !97 + br label %foreach.head.L46, !dbg !97 foreach.exit.L46: ; preds = %foreach.head.L46 - %78 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 0), !dbg !103 - %79 = load i32, ptr %78, align 4, !dbg !104 - %80 = icmp eq i32 %79, 123, !dbg !104 - br i1 %80, label %assert.exit.L49, label %assert.then.L49, !dbg !104, !prof !42 + %78 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 0), !dbg !98 + %79 = load i32, ptr %78, align 4, !dbg !99 + %80 = icmp eq i32 %79, 123, !dbg !99 + br i1 %80, label %assert.exit.L49, label %assert.then.L49, !dbg !99, !prof !42 assert.then.L49: ; preds = %foreach.exit.L46 - %81 = call i32 (ptr, ...) @printf(ptr @anon.string.16), !dbg !104 - call void @exit(i32 1), !dbg !104 - unreachable, !dbg !104 + %81 = call i32 (ptr, ...) @printf(ptr @anon.string.16), !dbg !99 + call void @exit(i32 1), !dbg !99 + unreachable, !dbg !99 assert.exit.L49: ; preds = %foreach.exit.L46 - %82 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 1), !dbg !105 - %83 = load i32, ptr %82, align 4, !dbg !106 - %84 = icmp eq i32 %83, 4321, !dbg !106 - br i1 %84, label %assert.exit.L50, label %assert.then.L50, !dbg !106, !prof !42 + %82 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 1), !dbg !100 + %83 = load i32, ptr %82, align 4, !dbg !101 + %84 = icmp eq i32 %83, 4321, !dbg !101 + br i1 %84, label %assert.exit.L50, label %assert.then.L50, !dbg !101, !prof !42 assert.then.L50: ; preds = %assert.exit.L49 - %85 = call i32 (ptr, ...) @printf(ptr @anon.string.17), !dbg !106 - call void @exit(i32 1), !dbg !106 - unreachable, !dbg !106 + %85 = call i32 (ptr, ...) @printf(ptr @anon.string.17), !dbg !101 + call void @exit(i32 1), !dbg !101 + unreachable, !dbg !101 assert.exit.L50: ; preds = %assert.exit.L49 - %86 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 2), !dbg !107 - %87 = load i32, ptr %86, align 4, !dbg !108 - %88 = icmp eq i32 %87, 9876, !dbg !108 - br i1 %88, label %assert.exit.L51, label %assert.then.L51, !dbg !108, !prof !42 + %86 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 2), !dbg !102 + %87 = load i32, ptr %86, align 4, !dbg !103 + %88 = icmp eq i32 %87, 9876, !dbg !103 + br i1 %88, label %assert.exit.L51, label %assert.then.L51, !dbg !103, !prof !42 assert.then.L51: ; preds = %assert.exit.L50 - %89 = call i32 (ptr, ...) @printf(ptr @anon.string.18), !dbg !108 - call void @exit(i32 1), !dbg !108 - unreachable, !dbg !108 + %89 = call i32 (ptr, ...) @printf(ptr @anon.string.18), !dbg !103 + call void @exit(i32 1), !dbg !103 + unreachable, !dbg !103 assert.exit.L51: ; preds = %assert.exit.L50 - %90 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !109 - call void @llvm.dbg.declare(metadata ptr %item1, metadata !111, metadata !DIExpression()), !dbg !112 - store %struct.VectorIterator %90, ptr %11, align 8, !dbg !109 - br label %foreach.head.L54, !dbg !112 + %90 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !104 + call void @llvm.dbg.declare(metadata ptr %item1, metadata !106, metadata !DIExpression()), !dbg !107 + store %struct.VectorIterator %90, ptr %11, align 8, !dbg !104 + br label %foreach.head.L54, !dbg !107 foreach.head.L54: ; preds = %foreach.tail.L54, %assert.exit.L51 - %91 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr %11), !dbg !112 - br i1 %91, label %foreach.body.L54, label %foreach.exit.L54, !dbg !112 + %91 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr %11), !dbg !107 + br i1 %91, label %foreach.body.L54, label %foreach.exit.L54, !dbg !107 foreach.body.L54: ; preds = %foreach.head.L54 - %92 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr %11), !dbg !112 - store ptr %92, ptr %12, align 8, !dbg !112 - %93 = load ptr, ptr %12, align 8, !dbg !113 - %94 = load i32, ptr %93, align 4, !dbg !113 - %95 = add nsw i32 %94, 1, !dbg !113 - store i32 %95, ptr %93, align 4, !dbg !113 - br label %foreach.tail.L54, !dbg !113 + %92 = call ptr @_ZN14VectorIteratorIiE3getEv(ptr %11), !dbg !107 + store ptr %92, ptr %12, align 8, !dbg !107 + %93 = load ptr, ptr %12, align 8, !dbg !108 + %94 = load i32, ptr %93, align 4, !dbg !108 + %95 = add nsw i32 %94, 1, !dbg !108 + store i32 %95, ptr %93, align 4, !dbg !108 + br label %foreach.tail.L54, !dbg !108 foreach.tail.L54: ; preds = %foreach.body.L54 - call void @_ZN14VectorIteratorIiE4nextEv(ptr %11), !dbg !113 - br label %foreach.head.L54, !dbg !113 + call void @_ZN14VectorIteratorIiE4nextEv(ptr %11), !dbg !108 + br label %foreach.head.L54, !dbg !108 foreach.exit.L54: ; preds = %foreach.head.L54 - %96 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 0), !dbg !114 - %97 = load i32, ptr %96, align 4, !dbg !115 - %98 = icmp eq i32 %97, 124, !dbg !115 - br i1 %98, label %assert.exit.L57, label %assert.then.L57, !dbg !115, !prof !42 + %96 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 0), !dbg !109 + %97 = load i32, ptr %96, align 4, !dbg !110 + %98 = icmp eq i32 %97, 124, !dbg !110 + br i1 %98, label %assert.exit.L57, label %assert.then.L57, !dbg !110, !prof !42 assert.then.L57: ; preds = %foreach.exit.L54 - %99 = call i32 (ptr, ...) @printf(ptr @anon.string.19), !dbg !115 - call void @exit(i32 1), !dbg !115 - unreachable, !dbg !115 + %99 = call i32 (ptr, ...) @printf(ptr @anon.string.19), !dbg !110 + call void @exit(i32 1), !dbg !110 + unreachable, !dbg !110 assert.exit.L57: ; preds = %foreach.exit.L54 - %100 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 1), !dbg !116 - %101 = load i32, ptr %100, align 4, !dbg !117 - %102 = icmp eq i32 %101, 4322, !dbg !117 - br i1 %102, label %assert.exit.L58, label %assert.then.L58, !dbg !117, !prof !42 + %100 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 1), !dbg !111 + %101 = load i32, ptr %100, align 4, !dbg !112 + %102 = icmp eq i32 %101, 4322, !dbg !112 + br i1 %102, label %assert.exit.L58, label %assert.then.L58, !dbg !112, !prof !42 assert.then.L58: ; preds = %assert.exit.L57 - %103 = call i32 (ptr, ...) @printf(ptr @anon.string.20), !dbg !117 - call void @exit(i32 1), !dbg !117 - unreachable, !dbg !117 + %103 = call i32 (ptr, ...) @printf(ptr @anon.string.20), !dbg !112 + call void @exit(i32 1), !dbg !112 + unreachable, !dbg !112 assert.exit.L58: ; preds = %assert.exit.L57 - %104 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 2), !dbg !118 - %105 = load i32, ptr %104, align 4, !dbg !119 - %106 = icmp eq i32 %105, 9877, !dbg !119 - br i1 %106, label %assert.exit.L59, label %assert.then.L59, !dbg !119, !prof !42 + %104 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 2), !dbg !113 + %105 = load i32, ptr %104, align 4, !dbg !114 + %106 = icmp eq i32 %105, 9877, !dbg !114 + br i1 %106, label %assert.exit.L59, label %assert.then.L59, !dbg !114, !prof !42 assert.then.L59: ; preds = %assert.exit.L58 - %107 = call i32 (ptr, ...) @printf(ptr @anon.string.21), !dbg !119 - call void @exit(i32 1), !dbg !119 - unreachable, !dbg !119 + %107 = call i32 (ptr, ...) @printf(ptr @anon.string.21), !dbg !114 + call void @exit(i32 1), !dbg !114 + unreachable, !dbg !114 assert.exit.L59: ; preds = %assert.exit.L58 - %108 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !120 - store %struct.VectorIterator %108, ptr %13, align 8, !dbg !120 - call void @llvm.dbg.declare(metadata ptr %idx, metadata !122, metadata !DIExpression()), !dbg !124 - call void @llvm.dbg.declare(metadata ptr %item2, metadata !125, metadata !DIExpression()), !dbg !126 - store i64 0, ptr %idx, align 8, !dbg !124 - br label %foreach.head.L61, !dbg !126 + %108 = call %struct.VectorIterator @_ZN6VectorIiE11getIteratorEv(ptr noundef nonnull align 8 dereferenceable(32) %vi), !dbg !115 + store %struct.VectorIterator %108, ptr %13, align 8, !dbg !115 + call void @llvm.dbg.declare(metadata ptr %idx, metadata !117, metadata !DIExpression()), !dbg !119 + call void @llvm.dbg.declare(metadata ptr %item2, metadata !120, metadata !DIExpression()), !dbg !121 + store i64 0, ptr %idx, align 8, !dbg !119 + br label %foreach.head.L61, !dbg !121 foreach.head.L61: ; preds = %foreach.tail.L61, %assert.exit.L59 - %109 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr %13), !dbg !126 - br i1 %109, label %foreach.body.L61, label %foreach.exit.L61, !dbg !126 + %109 = call i1 @_ZN14VectorIteratorIiE7isValidEv(ptr %13), !dbg !121 + br i1 %109, label %foreach.body.L61, label %foreach.exit.L61, !dbg !121 foreach.body.L61: ; preds = %foreach.head.L61 - %pair3 = call %struct.Pair @_ZN14VectorIteratorIiE6getIdxEv(ptr %13), !dbg !126 - store %struct.Pair %pair3, ptr %pair_addr, align 8, !dbg !126 - %110 = load i64, ptr %pair_addr, align 8, !dbg !126 - store i64 %110, ptr %idx, align 8, !dbg !126 - %item_addr = getelementptr inbounds %struct.Pair, ptr %pair_addr, i32 0, i32 1, !dbg !126 - %111 = load ptr, ptr %item_addr, align 8, !dbg !126 - store ptr %111, ptr %14, align 8, !dbg !126 - %112 = load i64, ptr %idx, align 8, !dbg !127 - %113 = trunc i64 %112 to i32, !dbg !127 - %114 = load ptr, ptr %14, align 8, !dbg !127 - %115 = load i32, ptr %114, align 4, !dbg !127 - %116 = add nsw i32 %115, %113, !dbg !127 - store i32 %116, ptr %114, align 4, !dbg !127 - br label %foreach.tail.L61, !dbg !127 + %pair3 = call %struct.Pair @_ZN14VectorIteratorIiE6getIdxEv(ptr %13), !dbg !121 + store %struct.Pair %pair3, ptr %pair_addr, align 8, !dbg !121 + %110 = load i64, ptr %pair_addr, align 8, !dbg !121 + store i64 %110, ptr %idx, align 8, !dbg !121 + %item_addr = getelementptr inbounds %struct.Pair, ptr %pair_addr, i32 0, i32 1, !dbg !121 + %111 = load ptr, ptr %item_addr, align 8, !dbg !121 + store ptr %111, ptr %14, align 8, !dbg !121 + %112 = load i64, ptr %idx, align 8, !dbg !122 + %113 = trunc i64 %112 to i32, !dbg !122 + %114 = load ptr, ptr %14, align 8, !dbg !122 + %115 = load i32, ptr %114, align 4, !dbg !122 + %116 = add nsw i32 %115, %113, !dbg !122 + store i32 %116, ptr %114, align 4, !dbg !122 + br label %foreach.tail.L61, !dbg !122 foreach.tail.L61: ; preds = %foreach.body.L61 - call void @_ZN14VectorIteratorIiE4nextEv(ptr %13), !dbg !127 - br label %foreach.head.L61, !dbg !127 + call void @_ZN14VectorIteratorIiE4nextEv(ptr %13), !dbg !122 + br label %foreach.head.L61, !dbg !122 foreach.exit.L61: ; preds = %foreach.head.L61 - %117 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 0), !dbg !128 - %118 = load i32, ptr %117, align 4, !dbg !129 - %119 = icmp eq i32 %118, 124, !dbg !129 - br i1 %119, label %assert.exit.L64, label %assert.then.L64, !dbg !129, !prof !42 + %117 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 0), !dbg !123 + %118 = load i32, ptr %117, align 4, !dbg !124 + %119 = icmp eq i32 %118, 124, !dbg !124 + br i1 %119, label %assert.exit.L64, label %assert.then.L64, !dbg !124, !prof !42 assert.then.L64: ; preds = %foreach.exit.L61 - %120 = call i32 (ptr, ...) @printf(ptr @anon.string.22), !dbg !129 - call void @exit(i32 1), !dbg !129 - unreachable, !dbg !129 + %120 = call i32 (ptr, ...) @printf(ptr @anon.string.22), !dbg !124 + call void @exit(i32 1), !dbg !124 + unreachable, !dbg !124 assert.exit.L64: ; preds = %foreach.exit.L61 - %121 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 1), !dbg !130 - %122 = load i32, ptr %121, align 4, !dbg !131 - %123 = icmp eq i32 %122, 4323, !dbg !131 - br i1 %123, label %assert.exit.L65, label %assert.then.L65, !dbg !131, !prof !42 + %121 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 1), !dbg !125 + %122 = load i32, ptr %121, align 4, !dbg !126 + %123 = icmp eq i32 %122, 4323, !dbg !126 + br i1 %123, label %assert.exit.L65, label %assert.then.L65, !dbg !126, !prof !42 assert.then.L65: ; preds = %assert.exit.L64 - %124 = call i32 (ptr, ...) @printf(ptr @anon.string.23), !dbg !131 - call void @exit(i32 1), !dbg !131 - unreachable, !dbg !131 + %124 = call i32 (ptr, ...) @printf(ptr @anon.string.23), !dbg !126 + call void @exit(i32 1), !dbg !126 + unreachable, !dbg !126 assert.exit.L65: ; preds = %assert.exit.L64 - %125 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 2), !dbg !132 - %126 = load i32, ptr %125, align 4, !dbg !133 - %127 = icmp eq i32 %126, 9879, !dbg !133 - br i1 %127, label %assert.exit.L66, label %assert.then.L66, !dbg !133, !prof !42 + %125 = call ptr @_ZN6VectorIiE3getEj(ptr noundef nonnull align 8 dereferenceable(32) %vi, i32 2), !dbg !127 + %126 = load i32, ptr %125, align 4, !dbg !128 + %127 = icmp eq i32 %126, 9879, !dbg !128 + br i1 %127, label %assert.exit.L66, label %assert.then.L66, !dbg !128, !prof !42 assert.then.L66: ; preds = %assert.exit.L65 - %128 = call i32 (ptr, ...) @printf(ptr @anon.string.24), !dbg !133 - call void @exit(i32 1), !dbg !133 - unreachable, !dbg !133 + %128 = call i32 (ptr, ...) @printf(ptr @anon.string.24), !dbg !128 + call void @exit(i32 1), !dbg !128 + unreachable, !dbg !128 assert.exit.L66: ; preds = %assert.exit.L65 - %129 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.0), !dbg !134 - call void @_ZN6VectorIiE4dtorEv(ptr %vi), !dbg !134 - %130 = load i32, ptr %result, align 4, !dbg !134 - ret i32 %130, !dbg !134 + %129 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.0), !dbg !129 + call void @_ZN6VectorIiE4dtorEv(ptr %vi), !dbg !129 + %130 = load i32, ptr %result, align 4, !dbg !129 + ret i32 %130, !dbg !129 } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) @@ -539,92 +539,87 @@ attributes #3 = { cold noreturn nounwind } !43 = !DILocation(line: 13, column: 14, scope: !15) !44 = !DILocalVariable(name: "it", scope: !15, file: !5, line: 13, type: !45) !45 = !DICompositeType(tag: DW_TAG_structure_type, name: "VectorIterator", scope: !5, file: !5, line: 253, size: 192, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !46, identifier: "struct.VectorIterator") -!46 = !{!47, !54} +!46 = !{!47, !49} !47 = !DIDerivedType(tag: DW_TAG_member, name: "vector", scope: !45, file: !5, line: 254, baseType: !48, size: 64, offset: 64) -!48 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !49, size: 64) -!49 = !DICompositeType(tag: DW_TAG_structure_type, name: "Vector", scope: !5, file: !5, line: 25, size: 256, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !50, identifier: "struct.Vector") -!50 = !{!51, !52, !53} -!51 = !DIDerivedType(tag: DW_TAG_member, name: "contents", scope: !49, file: !5, line: 26, baseType: !31, size: 64, offset: 64) -!52 = !DIDerivedType(tag: DW_TAG_member, name: "capacity", scope: !49, file: !5, line: 27, baseType: !33, size: 64, offset: 128) -!53 = !DIDerivedType(tag: DW_TAG_member, name: "size", scope: !49, file: !5, line: 28, baseType: !33, size: 64, offset: 192) -!54 = !DIDerivedType(tag: DW_TAG_member, name: "cursor", scope: !45, file: !5, line: 255, baseType: !33, size: 64, offset: 128) -!55 = !DILocation(line: 13, column: 5, scope: !15) -!56 = !DILocation(line: 14, column: 12, scope: !15) -!57 = !DILocation(line: 15, column: 12, scope: !15) -!58 = !DILocation(line: 15, column: 24, scope: !15) -!59 = !DILocation(line: 16, column: 12, scope: !15) -!60 = !DILocation(line: 16, column: 24, scope: !15) -!61 = !DILocation(line: 17, column: 5, scope: !15) -!62 = !DILocation(line: 18, column: 12, scope: !15) -!63 = !DILocation(line: 18, column: 24, scope: !15) -!64 = !DILocation(line: 19, column: 12, scope: !15) -!65 = !DILocation(line: 20, column: 5, scope: !15) -!66 = !DILocation(line: 21, column: 16, scope: !15) -!67 = !DILocalVariable(name: "pair", scope: !15, file: !5, line: 21, type: !68) -!68 = !DICompositeType(tag: DW_TAG_structure_type, name: "Pair", scope: !5, file: !5, line: 8, size: 128, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !69, identifier: "struct.Pair") -!69 = !{!70, !71} -!70 = !DIDerivedType(tag: DW_TAG_member, name: "first", scope: !68, file: !5, line: 9, baseType: !33, size: 64) -!71 = !DIDerivedType(tag: DW_TAG_member, name: "second", scope: !68, file: !5, line: 10, baseType: !72, size: 64, offset: 64) -!72 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !18, size: 64) -!73 = !DILocation(line: 21, column: 5, scope: !15) -!74 = !DILocation(line: 22, column: 12, scope: !15) -!75 = !DILocation(line: 22, column: 31, scope: !15) -!76 = !DILocation(line: 23, column: 12, scope: !15) -!77 = !DILocation(line: 23, column: 32, scope: !15) -!78 = !DILocation(line: 24, column: 5, scope: !15) -!79 = !DILocation(line: 25, column: 13, scope: !15) -!80 = !DILocation(line: 28, column: 17, scope: !15) -!81 = !DILocation(line: 29, column: 17, scope: !15) -!82 = !DILocation(line: 30, column: 12, scope: !15) -!83 = !DILocation(line: 33, column: 5, scope: !15) -!84 = !DILocation(line: 34, column: 12, scope: !15) -!85 = !DILocation(line: 34, column: 24, scope: !15) -!86 = !DILocation(line: 35, column: 12, scope: !15) -!87 = !DILocation(line: 36, column: 5, scope: !15) -!88 = !DILocation(line: 37, column: 12, scope: !15) -!89 = !DILocation(line: 37, column: 24, scope: !15) -!90 = !DILocation(line: 38, column: 5, scope: !15) -!91 = !DILocation(line: 39, column: 12, scope: !15) -!92 = !DILocation(line: 39, column: 24, scope: !15) -!93 = !DILocation(line: 40, column: 5, scope: !15) -!94 = !DILocation(line: 41, column: 12, scope: !15) -!95 = !DILocation(line: 41, column: 24, scope: !15) -!96 = !DILocation(line: 42, column: 5, scope: !15) -!97 = !DILocation(line: 43, column: 13, scope: !15) -!98 = !DILocation(line: 46, column: 24, scope: !99) -!99 = distinct !DILexicalBlock(scope: !15, file: !5, line: 46, column: 5) -!100 = !DILocalVariable(name: "item", scope: !99, file: !5, line: 46, type: !18) -!101 = !DILocation(line: 46, column: 13, scope: !99) -!102 = !DILocation(line: 47, column: 9, scope: !99) -!103 = !DILocation(line: 49, column: 19, scope: !15) -!104 = !DILocation(line: 49, column: 25, scope: !15) -!105 = !DILocation(line: 50, column: 19, scope: !15) -!106 = !DILocation(line: 50, column: 25, scope: !15) -!107 = !DILocation(line: 51, column: 19, scope: !15) -!108 = !DILocation(line: 51, column: 25, scope: !15) -!109 = !DILocation(line: 54, column: 25, scope: !110) -!110 = distinct !DILexicalBlock(scope: !15, file: !5, line: 54, column: 5) -!111 = !DILocalVariable(name: "item", scope: !110, file: !5, line: 54, type: !72) -!112 = !DILocation(line: 54, column: 13, scope: !110) -!113 = !DILocation(line: 55, column: 9, scope: !110) -!114 = !DILocation(line: 57, column: 19, scope: !15) -!115 = !DILocation(line: 57, column: 25, scope: !15) -!116 = !DILocation(line: 58, column: 19, scope: !15) -!117 = !DILocation(line: 58, column: 25, scope: !15) -!118 = !DILocation(line: 59, column: 19, scope: !15) -!119 = !DILocation(line: 59, column: 25, scope: !15) -!120 = !DILocation(line: 61, column: 35, scope: !121) -!121 = distinct !DILexicalBlock(scope: !15, file: !5, line: 61, column: 5) -!122 = !DILocalVariable(name: "idx", scope: !121, file: !5, line: 61, type: !123) -!123 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) -!124 = !DILocation(line: 61, column: 13, scope: !121) -!125 = !DILocalVariable(name: "item", scope: !121, file: !5, line: 61, type: !72) -!126 = !DILocation(line: 61, column: 23, scope: !121) -!127 = !DILocation(line: 62, column: 9, scope: !121) -!128 = !DILocation(line: 64, column: 19, scope: !15) -!129 = !DILocation(line: 64, column: 25, scope: !15) -!130 = !DILocation(line: 65, column: 19, scope: !15) -!131 = !DILocation(line: 65, column: 25, scope: !15) -!132 = !DILocation(line: 66, column: 19, scope: !15) -!133 = !DILocation(line: 66, column: 25, scope: !15) -!134 = !DILocation(line: 68, column: 5, scope: !15) +!48 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !28, size: 64) +!49 = !DIDerivedType(tag: DW_TAG_member, name: "cursor", scope: !45, file: !5, line: 255, baseType: !33, size: 64, offset: 128) +!50 = !DILocation(line: 13, column: 5, scope: !15) +!51 = !DILocation(line: 14, column: 12, scope: !15) +!52 = !DILocation(line: 15, column: 12, scope: !15) +!53 = !DILocation(line: 15, column: 24, scope: !15) +!54 = !DILocation(line: 16, column: 12, scope: !15) +!55 = !DILocation(line: 16, column: 24, scope: !15) +!56 = !DILocation(line: 17, column: 5, scope: !15) +!57 = !DILocation(line: 18, column: 12, scope: !15) +!58 = !DILocation(line: 18, column: 24, scope: !15) +!59 = !DILocation(line: 19, column: 12, scope: !15) +!60 = !DILocation(line: 20, column: 5, scope: !15) +!61 = !DILocation(line: 21, column: 16, scope: !15) +!62 = !DILocalVariable(name: "pair", scope: !15, file: !5, line: 21, type: !63) +!63 = !DICompositeType(tag: DW_TAG_structure_type, name: "Pair", scope: !5, file: !5, line: 8, size: 128, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !64, identifier: "struct.Pair") +!64 = !{!65, !66} +!65 = !DIDerivedType(tag: DW_TAG_member, name: "first", scope: !63, file: !5, line: 9, baseType: !33, size: 64) +!66 = !DIDerivedType(tag: DW_TAG_member, name: "second", scope: !63, file: !5, line: 10, baseType: !67, size: 64, offset: 64) +!67 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !18, size: 64) +!68 = !DILocation(line: 21, column: 5, scope: !15) +!69 = !DILocation(line: 22, column: 12, scope: !15) +!70 = !DILocation(line: 22, column: 31, scope: !15) +!71 = !DILocation(line: 23, column: 12, scope: !15) +!72 = !DILocation(line: 23, column: 32, scope: !15) +!73 = !DILocation(line: 24, column: 5, scope: !15) +!74 = !DILocation(line: 25, column: 13, scope: !15) +!75 = !DILocation(line: 28, column: 17, scope: !15) +!76 = !DILocation(line: 29, column: 17, scope: !15) +!77 = !DILocation(line: 30, column: 12, scope: !15) +!78 = !DILocation(line: 33, column: 5, scope: !15) +!79 = !DILocation(line: 34, column: 12, scope: !15) +!80 = !DILocation(line: 34, column: 24, scope: !15) +!81 = !DILocation(line: 35, column: 12, scope: !15) +!82 = !DILocation(line: 36, column: 5, scope: !15) +!83 = !DILocation(line: 37, column: 12, scope: !15) +!84 = !DILocation(line: 37, column: 24, scope: !15) +!85 = !DILocation(line: 38, column: 5, scope: !15) +!86 = !DILocation(line: 39, column: 12, scope: !15) +!87 = !DILocation(line: 39, column: 24, scope: !15) +!88 = !DILocation(line: 40, column: 5, scope: !15) +!89 = !DILocation(line: 41, column: 12, scope: !15) +!90 = !DILocation(line: 41, column: 24, scope: !15) +!91 = !DILocation(line: 42, column: 5, scope: !15) +!92 = !DILocation(line: 43, column: 13, scope: !15) +!93 = !DILocation(line: 46, column: 24, scope: !94) +!94 = distinct !DILexicalBlock(scope: !15, file: !5, line: 46, column: 5) +!95 = !DILocalVariable(name: "item", scope: !94, file: !5, line: 46, type: !18) +!96 = !DILocation(line: 46, column: 13, scope: !94) +!97 = !DILocation(line: 47, column: 9, scope: !94) +!98 = !DILocation(line: 49, column: 19, scope: !15) +!99 = !DILocation(line: 49, column: 25, scope: !15) +!100 = !DILocation(line: 50, column: 19, scope: !15) +!101 = !DILocation(line: 50, column: 25, scope: !15) +!102 = !DILocation(line: 51, column: 19, scope: !15) +!103 = !DILocation(line: 51, column: 25, scope: !15) +!104 = !DILocation(line: 54, column: 25, scope: !105) +!105 = distinct !DILexicalBlock(scope: !15, file: !5, line: 54, column: 5) +!106 = !DILocalVariable(name: "item", scope: !105, file: !5, line: 54, type: !67) +!107 = !DILocation(line: 54, column: 13, scope: !105) +!108 = !DILocation(line: 55, column: 9, scope: !105) +!109 = !DILocation(line: 57, column: 19, scope: !15) +!110 = !DILocation(line: 57, column: 25, scope: !15) +!111 = !DILocation(line: 58, column: 19, scope: !15) +!112 = !DILocation(line: 58, column: 25, scope: !15) +!113 = !DILocation(line: 59, column: 19, scope: !15) +!114 = !DILocation(line: 59, column: 25, scope: !15) +!115 = !DILocation(line: 61, column: 35, scope: !116) +!116 = distinct !DILexicalBlock(scope: !15, file: !5, line: 61, column: 5) +!117 = !DILocalVariable(name: "idx", scope: !116, file: !5, line: 61, type: !118) +!118 = !DIBasicType(name: "long", size: 64, encoding: DW_ATE_signed) +!119 = !DILocation(line: 61, column: 13, scope: !116) +!120 = !DILocalVariable(name: "item", scope: !116, file: !5, line: 61, type: !67) +!121 = !DILocation(line: 61, column: 23, scope: !116) +!122 = !DILocation(line: 62, column: 9, scope: !116) +!123 = !DILocation(line: 64, column: 19, scope: !15) +!124 = !DILocation(line: 64, column: 25, scope: !15) +!125 = !DILocation(line: 65, column: 19, scope: !15) +!126 = !DILocation(line: 65, column: 25, scope: !15) +!127 = !DILocation(line: 66, column: 19, scope: !15) +!128 = !DILocation(line: 66, column: 25, scope: !15) +!129 = !DILocation(line: 68, column: 5, scope: !15) diff --git a/test/test-files/irgenerator/debug-info/success-dbg-info-simple/ir-code.ll b/test/test-files/irgenerator/debug-info/success-dbg-info-simple/ir-code.ll index c6a51650e..1cfdad5dd 100644 --- a/test/test-files/irgenerator/debug-info/success-dbg-info-simple/ir-code.ll +++ b/test/test-files/irgenerator/debug-info/success-dbg-info-simple/ir-code.ll @@ -12,12 +12,12 @@ source_filename = "source.spice" ; Function Attrs: norecurse define void @_ZN10TestStruct4dtorEv(ptr noundef nonnull align 8 dereferenceable(40) %0) #0 !dbg !24 { %this = alloca ptr, align 8 - call void @llvm.dbg.declare(metadata ptr %this, metadata !44, metadata !DIExpression()), !dbg !56 - store ptr %0, ptr %this, align 8, !dbg !56 - %2 = load ptr, ptr %this, align 8, !dbg !56 - %3 = getelementptr inbounds %struct.TestStruct, ptr %2, i32 0, i32 1, !dbg !56 - call void @_ZN6String4dtorEv(ptr %3), !dbg !56 - ret void, !dbg !56 + call void @llvm.dbg.declare(metadata ptr %this, metadata !44, metadata !DIExpression()), !dbg !46 + store ptr %0, ptr %this, align 8, !dbg !46 + %2 = load ptr, ptr %this, align 8, !dbg !46 + %3 = getelementptr inbounds %struct.TestStruct, ptr %2, i32 0, i32 1, !dbg !46 + call void @_ZN6String4dtorEv(ptr %3), !dbg !46 + ret void, !dbg !46 } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) @@ -25,54 +25,54 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 declare void @_ZN6String4dtorEv(ptr) -define private %struct.TestStruct @_Z3fctRi(ptr %0) !dbg !57 { +define private %struct.TestStruct @_Z3fctRi(ptr %0) !dbg !47 { %result = alloca %struct.TestStruct, align 8 %ref = alloca ptr, align 8 %2 = alloca %struct.String, align 8 %ts = alloca %struct.TestStruct, align 8 - call void @llvm.dbg.declare(metadata ptr %result, metadata !71, metadata !DIExpression()), !dbg !82 - call void @llvm.dbg.declare(metadata ptr %ref, metadata !83, metadata !DIExpression()), !dbg !84 - store ptr %0, ptr %ref, align 8, !dbg !84 - call void @_ZN6String4ctorEPKc(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr @anon.string.0), !dbg !85 - store i64 6, ptr %ts, align 8, !dbg !86 - %3 = load %struct.String, ptr %2, align 8, !dbg !86 - %4 = getelementptr inbounds %struct.TestStruct, ptr %ts, i32 0, i32 1, !dbg !86 - store %struct.String %3, ptr %4, align 8, !dbg !86 - %5 = load ptr, ptr %ref, align 8, !dbg !86 - %6 = load i32, ptr %5, align 4, !dbg !86 - %7 = getelementptr inbounds %struct.TestStruct, ptr %ts, i32 0, i32 2, !dbg !86 - call void @llvm.dbg.declare(metadata ptr %ts, metadata !87, metadata !DIExpression()), !dbg !98 - store i32 %6, ptr %7, align 4, !dbg !86 - %8 = load %struct.TestStruct, ptr %ts, align 8, !dbg !99 - ret %struct.TestStruct %8, !dbg !99 + call void @llvm.dbg.declare(metadata ptr %result, metadata !51, metadata !DIExpression()), !dbg !52 + call void @llvm.dbg.declare(metadata ptr %ref, metadata !53, metadata !DIExpression()), !dbg !54 + store ptr %0, ptr %ref, align 8, !dbg !54 + call void @_ZN6String4ctorEPKc(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr @anon.string.0), !dbg !55 + store i64 6, ptr %ts, align 8, !dbg !56 + %3 = load %struct.String, ptr %2, align 8, !dbg !56 + %4 = getelementptr inbounds %struct.TestStruct, ptr %ts, i32 0, i32 1, !dbg !56 + store %struct.String %3, ptr %4, align 8, !dbg !56 + %5 = load ptr, ptr %ref, align 8, !dbg !56 + %6 = load i32, ptr %5, align 4, !dbg !56 + %7 = getelementptr inbounds %struct.TestStruct, ptr %ts, i32 0, i32 2, !dbg !56 + call void @llvm.dbg.declare(metadata ptr %ts, metadata !57, metadata !DIExpression()), !dbg !58 + store i32 %6, ptr %7, align 4, !dbg !56 + %8 = load %struct.TestStruct, ptr %ts, align 8, !dbg !59 + ret %struct.TestStruct %8, !dbg !59 } declare void @_ZN6String4ctorEPKc(ptr, ptr) ; Function Attrs: noinline nounwind optnone uwtable -define dso_local i32 @main() #2 !dbg !100 { +define dso_local i32 @main() #2 !dbg !60 { %result = alloca i32, align 4 %test = alloca i32, align 4 %res = alloca %struct.TestStruct, align 8 - call void @llvm.dbg.declare(metadata ptr %result, metadata !103, metadata !DIExpression()), !dbg !104 - store i32 0, ptr %result, align 4, !dbg !104 - call void @llvm.dbg.declare(metadata ptr %test, metadata !105, metadata !DIExpression()), !dbg !106 - store i32 987654, ptr %test, align 4, !dbg !107 - %1 = call %struct.TestStruct @_Z3fctRi(ptr %test), !dbg !108 - call void @llvm.dbg.declare(metadata ptr %res, metadata !109, metadata !DIExpression()), !dbg !120 - store %struct.TestStruct %1, ptr %res, align 8, !dbg !108 - %lng_addr = getelementptr inbounds %struct.TestStruct, ptr %res, i32 0, i32 0, !dbg !121 - %2 = load i64, ptr %lng_addr, align 8, !dbg !121 - %3 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.0, i64 %2), !dbg !121 - %4 = getelementptr inbounds %struct.TestStruct, ptr %res, i32 0, i32 1, !dbg !122 - %5 = call ptr @_ZN6String6getRawEv(ptr noundef nonnull align 8 dereferenceable(24) %4), !dbg !122 - %6 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.1, ptr %5), !dbg !122 - %i_addr = getelementptr inbounds %struct.TestStruct, ptr %res, i32 0, i32 2, !dbg !123 - %7 = load i32, ptr %i_addr, align 4, !dbg !123 - %8 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.2, i32 %7), !dbg !123 - call void @_ZN10TestStruct4dtorEv(ptr %res), !dbg !123 - %9 = load i32, ptr %result, align 4, !dbg !123 - ret i32 %9, !dbg !123 + call void @llvm.dbg.declare(metadata ptr %result, metadata !63, metadata !DIExpression()), !dbg !64 + store i32 0, ptr %result, align 4, !dbg !64 + call void @llvm.dbg.declare(metadata ptr %test, metadata !65, metadata !DIExpression()), !dbg !66 + store i32 987654, ptr %test, align 4, !dbg !67 + %1 = call %struct.TestStruct @_Z3fctRi(ptr %test), !dbg !68 + call void @llvm.dbg.declare(metadata ptr %res, metadata !69, metadata !DIExpression()), !dbg !70 + store %struct.TestStruct %1, ptr %res, align 8, !dbg !68 + %lng_addr = getelementptr inbounds %struct.TestStruct, ptr %res, i32 0, i32 0, !dbg !71 + %2 = load i64, ptr %lng_addr, align 8, !dbg !71 + %3 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.0, i64 %2), !dbg !71 + %4 = getelementptr inbounds %struct.TestStruct, ptr %res, i32 0, i32 1, !dbg !72 + %5 = call ptr @_ZN6String6getRawEv(ptr noundef nonnull align 8 dereferenceable(24) %4), !dbg !72 + %6 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.1, ptr %5), !dbg !72 + %i_addr = getelementptr inbounds %struct.TestStruct, ptr %res, i32 0, i32 2, !dbg !73 + %7 = load i32, ptr %i_addr, align 4, !dbg !73 + %8 = call i32 (ptr, ...) @printf(ptr noundef @printf.str.2, i32 %7), !dbg !73 + call void @_ZN10TestStruct4dtorEv(ptr %res), !dbg !73 + %9 = load i32, ptr %result, align 4, !dbg !73 + ret i32 %9, !dbg !73 } ; Function Attrs: nofree nounwind @@ -134,82 +134,32 @@ attributes #3 = { nofree nounwind } !42 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) !43 = !{} !44 = !DILocalVariable(name: "this", arg: 1, scope: !24, file: !7, line: 1, type: !45) -!45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !46, size: 64) -!46 = !DICompositeType(tag: DW_TAG_structure_type, name: "TestStruct", scope: !7, file: !7, line: 1, size: 320, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !47, identifier: "struct.TestStruct") -!47 = !{!48, !49, !55} -!48 = !DIDerivedType(tag: DW_TAG_member, name: "lng", scope: !46, file: !7, line: 2, baseType: !31, size: 64) -!49 = !DIDerivedType(tag: DW_TAG_member, name: "str", scope: !46, file: !7, line: 3, baseType: !50, size: 192, align: 8, offset: 64) -!50 = !DICompositeType(tag: DW_TAG_structure_type, name: "String", scope: !7, file: !7, line: 18, size: 192, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !51, identifier: "struct.String") -!51 = !{!52, !53, !54} -!52 = !DIDerivedType(tag: DW_TAG_member, name: "contents", scope: !50, file: !7, line: 19, baseType: !36, size: 64) -!53 = !DIDerivedType(tag: DW_TAG_member, name: "capacity", scope: !50, file: !7, line: 20, baseType: !39, size: 64, offset: 64) -!54 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !50, file: !7, line: 21, baseType: !39, size: 64, offset: 128) -!55 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !46, file: !7, line: 4, baseType: !42, size: 32, offset: 256) -!56 = !DILocation(line: 1, column: 1, scope: !24) -!57 = distinct !DISubprogram(name: "fct", linkageName: "_Z3fctRi", scope: !7, file: !7, line: 7, type: !58, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) -!58 = !DISubroutineType(types: !59) -!59 = !{!60, !70} -!60 = !DICompositeType(tag: DW_TAG_structure_type, name: "TestStruct", scope: !7, file: !7, line: 1, size: 320, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !61, identifier: "struct.TestStruct") -!61 = !{!62, !63, !69} -!62 = !DIDerivedType(tag: DW_TAG_member, name: "lng", scope: !60, file: !7, line: 2, baseType: !31, size: 64) -!63 = !DIDerivedType(tag: DW_TAG_member, name: "str", scope: !60, file: !7, line: 3, baseType: !64, size: 192, align: 8, offset: 64) -!64 = !DICompositeType(tag: DW_TAG_structure_type, name: "String", scope: !7, file: !7, line: 18, size: 192, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !65, identifier: "struct.String") -!65 = !{!66, !67, !68} -!66 = !DIDerivedType(tag: DW_TAG_member, name: "contents", scope: !64, file: !7, line: 19, baseType: !36, size: 64) -!67 = !DIDerivedType(tag: DW_TAG_member, name: "capacity", scope: !64, file: !7, line: 20, baseType: !39, size: 64, offset: 64) -!68 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !64, file: !7, line: 21, baseType: !39, size: 64, offset: 128) -!69 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !60, file: !7, line: 4, baseType: !42, size: 32, offset: 256) -!70 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !42, size: 64) -!71 = !DILocalVariable(name: "result", scope: !57, file: !7, line: 7, type: !72) -!72 = !DICompositeType(tag: DW_TAG_structure_type, name: "TestStruct", scope: !7, file: !7, line: 1, size: 320, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !73, identifier: "struct.TestStruct") -!73 = !{!74, !75, !81} -!74 = !DIDerivedType(tag: DW_TAG_member, name: "lng", scope: !72, file: !7, line: 2, baseType: !31, size: 64) -!75 = !DIDerivedType(tag: DW_TAG_member, name: "str", scope: !72, file: !7, line: 3, baseType: !76, size: 192, align: 8, offset: 64) -!76 = !DICompositeType(tag: DW_TAG_structure_type, name: "String", scope: !7, file: !7, line: 18, size: 192, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !77, identifier: "struct.String") -!77 = !{!78, !79, !80} -!78 = !DIDerivedType(tag: DW_TAG_member, name: "contents", scope: !76, file: !7, line: 19, baseType: !36, size: 64) -!79 = !DIDerivedType(tag: DW_TAG_member, name: "capacity", scope: !76, file: !7, line: 20, baseType: !39, size: 64, offset: 64) -!80 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !76, file: !7, line: 21, baseType: !39, size: 64, offset: 128) -!81 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !72, file: !7, line: 4, baseType: !42, size: 32, offset: 256) -!82 = !DILocation(line: 7, column: 1, scope: !57) -!83 = !DILocalVariable(name: "ref", arg: 1, scope: !57, file: !7, line: 7, type: !70) -!84 = !DILocation(line: 7, column: 19, scope: !57) -!85 = !DILocation(line: 8, column: 44, scope: !57) -!86 = !DILocation(line: 8, column: 60, scope: !57) -!87 = !DILocalVariable(name: "ts", scope: !57, file: !7, line: 8, type: !88) -!88 = !DICompositeType(tag: DW_TAG_structure_type, name: "TestStruct", scope: !7, file: !7, line: 1, size: 320, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !89, identifier: "struct.TestStruct") -!89 = !{!90, !91, !97} -!90 = !DIDerivedType(tag: DW_TAG_member, name: "lng", scope: !88, file: !7, line: 2, baseType: !31, size: 64) -!91 = !DIDerivedType(tag: DW_TAG_member, name: "str", scope: !88, file: !7, line: 3, baseType: !92, size: 192, align: 8, offset: 64) -!92 = !DICompositeType(tag: DW_TAG_structure_type, name: "String", scope: !7, file: !7, line: 18, size: 192, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !93, identifier: "struct.String") -!93 = !{!94, !95, !96} -!94 = !DIDerivedType(tag: DW_TAG_member, name: "contents", scope: !92, file: !7, line: 19, baseType: !36, size: 64) -!95 = !DIDerivedType(tag: DW_TAG_member, name: "capacity", scope: !92, file: !7, line: 20, baseType: !39, size: 64, offset: 64) -!96 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !92, file: !7, line: 21, baseType: !39, size: 64, offset: 128) -!97 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !88, file: !7, line: 4, baseType: !42, size: 32, offset: 256) -!98 = !DILocation(line: 8, column: 5, scope: !57) -!99 = !DILocation(line: 9, column: 12, scope: !57) -!100 = distinct !DISubprogram(name: "main", linkageName: "_Z4mainv", scope: !7, file: !7, line: 12, type: !101, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) -!101 = !DISubroutineType(types: !102) -!102 = !{!42} -!103 = !DILocalVariable(name: "result", scope: !100, file: !7, line: 12, type: !42) -!104 = !DILocation(line: 12, column: 1, scope: !100) -!105 = !DILocalVariable(name: "test", scope: !100, file: !7, line: 13, type: !42) -!106 = !DILocation(line: 13, column: 5, scope: !100) -!107 = !DILocation(line: 13, column: 16, scope: !100) -!108 = !DILocation(line: 14, column: 32, scope: !100) -!109 = !DILocalVariable(name: "res", scope: !100, file: !7, line: 14, type: !110) -!110 = !DICompositeType(tag: DW_TAG_structure_type, name: "TestStruct", scope: !7, file: !7, line: 1, size: 320, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !111, identifier: "struct.TestStruct") -!111 = !{!112, !113, !119} -!112 = !DIDerivedType(tag: DW_TAG_member, name: "lng", scope: !110, file: !7, line: 2, baseType: !31, size: 64) -!113 = !DIDerivedType(tag: DW_TAG_member, name: "str", scope: !110, file: !7, line: 3, baseType: !114, size: 192, align: 8, offset: 64) -!114 = !DICompositeType(tag: DW_TAG_structure_type, name: "String", scope: !7, file: !7, line: 18, size: 192, align: 8, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !115, identifier: "struct.String") -!115 = !{!116, !117, !118} -!116 = !DIDerivedType(tag: DW_TAG_member, name: "contents", scope: !114, file: !7, line: 19, baseType: !36, size: 64) -!117 = !DIDerivedType(tag: DW_TAG_member, name: "capacity", scope: !114, file: !7, line: 20, baseType: !39, size: 64, offset: 64) -!118 = !DIDerivedType(tag: DW_TAG_member, name: "length", scope: !114, file: !7, line: 21, baseType: !39, size: 64, offset: 128) -!119 = !DIDerivedType(tag: DW_TAG_member, name: "i", scope: !110, file: !7, line: 4, baseType: !42, size: 32, offset: 256) -!120 = !DILocation(line: 14, column: 5, scope: !100) -!121 = !DILocation(line: 15, column: 26, scope: !100) -!122 = !DILocation(line: 16, column: 28, scope: !100) -!123 = !DILocation(line: 17, column: 25, scope: !100) +!45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !28, size: 64) +!46 = !DILocation(line: 1, column: 1, scope: !24) +!47 = distinct !DISubprogram(name: "fct", linkageName: "_Z3fctRi", scope: !7, file: !7, line: 7, type: !48, scopeLine: 7, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +!48 = !DISubroutineType(types: !49) +!49 = !{!28, !50} +!50 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !42, size: 64) +!51 = !DILocalVariable(name: "result", scope: !47, file: !7, line: 7, type: !28) +!52 = !DILocation(line: 7, column: 1, scope: !47) +!53 = !DILocalVariable(name: "ref", arg: 1, scope: !47, file: !7, line: 7, type: !50) +!54 = !DILocation(line: 7, column: 19, scope: !47) +!55 = !DILocation(line: 8, column: 44, scope: !47) +!56 = !DILocation(line: 8, column: 60, scope: !47) +!57 = !DILocalVariable(name: "ts", scope: !47, file: !7, line: 8, type: !28) +!58 = !DILocation(line: 8, column: 5, scope: !47) +!59 = !DILocation(line: 9, column: 12, scope: !47) +!60 = distinct !DISubprogram(name: "main", linkageName: "_Z4mainv", scope: !7, file: !7, line: 12, type: !61, scopeLine: 12, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !43) +!61 = !DISubroutineType(types: !62) +!62 = !{!42} +!63 = !DILocalVariable(name: "result", scope: !60, file: !7, line: 12, type: !42) +!64 = !DILocation(line: 12, column: 1, scope: !60) +!65 = !DILocalVariable(name: "test", scope: !60, file: !7, line: 13, type: !42) +!66 = !DILocation(line: 13, column: 5, scope: !60) +!67 = !DILocation(line: 13, column: 16, scope: !60) +!68 = !DILocation(line: 14, column: 32, scope: !60) +!69 = !DILocalVariable(name: "res", scope: !60, file: !7, line: 14, type: !28) +!70 = !DILocation(line: 14, column: 5, scope: !60) +!71 = !DILocation(line: 15, column: 26, scope: !60) +!72 = !DILocation(line: 16, column: 28, scope: !60) +!73 = !DILocation(line: 17, column: 25, scope: !60)