llvm.org GIT mirror llvm / b0d0a65
Verifier: Check that inlined-at locations agree Check that the `MDLocalVariable::getInlinedAt()` in a debug info intrinsic's variable always matches the `MDLocation::getInlinedAt()` of its `!dbg` attachment. The goal here is to get rid of `MDLocalVariable::getInlinedAt()` entirely (PR22778), since it's expensive and unnecessary, but I'll let this verifier check bake for a while (a week maybe?) first. I've updated the testcases that had the wrong value for `inlinedAt:`. This checks that things are sane in the IR, but currently things go out of whack in a few places in the backend. I'll follow shortly with assertions in the backend (with code fixes). If you have out-of-tree testcases that just started failing, here's how I updated these ones: 1. The verifier check gives you the basic block, function, instruction, and relevant metadata arguments (metadata numbering doesn't necessarily match the source file, unfortunately). 2. Look at the `@llvm.dbg.*()` instruction, and compare the `inlinedAt:` fields of the variable argument (second `metadata` argument) and the `!dbg` attachment. 3. Figure out based on the variable `scope:` chain and the functions in the file whether the variable has been inlined (and into what), so you can determine which `inlinedAt:` is actually correct. In all of the in-tree testcases, the `!MDLocation()` was correct and the `!MDLocalVariable()` was wrong, but YMMV. 4. Duplicate the metadata that you're going to change, and add/drop the `inlinedAt:` field from one of them. Be careful that the other references to the same metadata node point at the correct one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234021 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 5 years ago
15 changed file(s) with 89 addition(s) and 36 deletion(s). Raw diff Collapse all Expand all
33713371 Assert(isa(DII.getRawExpression()),
33723372 "invalid llvm.dbg." + Kind + " intrinsic expression", &DII,
33733373 DII.getRawExpression());
3374
3375 // Ignore broken !dbg attachments; they're checked elsewhere.
3376 if (MDNode *N = DII.getDebugLoc().getAsMDNode())
3377 if (!isa(N))
3378 return;
3379
3380 // The inlined-at attachments for variables and !dbg attachments must agree.
3381 MDLocalVariable *Var = DII.getVariable();
3382 MDLocation *VarIA = Var->getInlinedAt();
3383 MDLocation *Loc = DII.getDebugLoc();
3384 MDLocation *LocIA = Loc ? Loc->getInlinedAt() : nullptr;
3385 BasicBlock *BB = DII.getParent();
3386 Assert(VarIA == LocIA, "mismatched variable and !dbg inlined-at", &DII, BB,
3387 BB ? BB->getParent() : nullptr, Var, VarIA, Loc, LocIA);
33743388 }
33753389
33763390 void Verifier::visitUnresolvedTypeRef(const MDString *S, const MDNode *N) {
4444 %3 = getelementptr inbounds i8, i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !37
4545 %4 = trunc i32 %argc to i8, !dbg !37
4646 %5 = add i8 %4, 97, !dbg !37
47 tail call void @llvm.dbg.value(metadata i8* %3, i64 0, metadata !19, metadata !MDExpression()) nounwind, !dbg !38
48 tail call void @llvm.dbg.value(metadata double %1, i64 0, metadata !20, metadata !MDExpression()) nounwind, !dbg !38
49 tail call void @llvm.dbg.value(metadata i8 %5, i64 0, metadata !21, metadata !MDExpression()) nounwind, !dbg !38
47 tail call void @llvm.dbg.value(metadata i8* %3, i64 0, metadata !49, metadata !MDExpression()) nounwind, !dbg !38
48 tail call void @llvm.dbg.value(metadata double %1, i64 0, metadata !50, metadata !MDExpression()) nounwind, !dbg !38
49 tail call void @llvm.dbg.value(metadata i8 %5, i64 0, metadata !51, metadata !MDExpression()) nounwind, !dbg !38
5050 %6 = zext i8 %5 to i32, !dbg !39
5151 %7 = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %3, double %1, i32 %6) nounwind, !dbg !39
5252 %8 = tail call i32 @printer(i8* %3, double %1, i8 zeroext %5) nounwind, !dbg !40
7474 !13 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !46, scope: !1, baseType: !14)
7575 !14 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 32, align: 32, file: !46, scope: !1, baseType: !15)
7676 !15 = !MDBasicType(tag: DW_TAG_base_type, name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
77 !16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 11, arg: 0, scope: !0, file: !1, type: !6)
78 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 11, arg: 0, scope: !0, file: !1, type: !7)
79 !18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 11, arg: 0, scope: !0, file: !1, type: !8)
80 !19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 0, scope: !9, file: !1, type: !6)
81 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 0, scope: !9, file: !1, type: !7)
82 !21 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 0, scope: !9, file: !1, type: !8)
77 !16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 11, arg: 1, scope: !0, file: !1, type: !6)
78 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 11, arg: 2, scope: !0, file: !1, type: !7)
79 !18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 11, arg: 3, scope: !0, file: !1, type: !8)
80 !19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !9, file: !1, type: !6)
81 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7)
82 !21 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !9, file: !1, type: !8)
83
84 !49 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !9, file: !1, type: !6, inlinedAt: !37)
85 !50 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7, inlinedAt: !37)
86 !51 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 2, scope: !9, file: !1, type: !8, inlinedAt: !37)
87
8388 !22 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 17, arg: 0, scope: !10, file: !1, type: !5)
8489 !23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 17, arg: 0, scope: !10, file: !1, type: !13)
8590 !24 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "dval", line: 19, scope: !25, file: !1, type: !7)
4747 %add.ptr = getelementptr i8, i8* bitcast (i32 (i32, i8**)* @main to i8*), i32 %argc, !dbg !40
4848 %add5 = add nsw i32 %argc, 97, !dbg !40
4949 %conv6 = trunc i32 %add5 to i8, !dbg !40
50 tail call void @llvm.dbg.value(metadata i8* %add.ptr, i64 0, metadata !8, metadata !MDExpression()) nounwind, !dbg !41
51 tail call void @llvm.dbg.value(metadata float %conv1, i64 0, metadata !10, metadata !MDExpression()) nounwind, !dbg !42
52 tail call void @llvm.dbg.value(metadata i8 %conv6, i64 0, metadata !12, metadata !MDExpression()) nounwind, !dbg !43
50 tail call void @llvm.dbg.value(metadata i8* %add.ptr, i64 0, metadata !58, metadata !MDExpression()) nounwind, !dbg !41
51 tail call void @llvm.dbg.value(metadata float %conv1, i64 0, metadata !60, metadata !MDExpression()) nounwind, !dbg !42
52 tail call void @llvm.dbg.value(metadata i8 %conv6, i64 0, metadata !62, metadata !MDExpression()) nounwind, !dbg !43
5353 %conv.i = fpext float %conv1 to double, !dbg !44
5454 %conv3.i = and i32 %add5, 255, !dbg !44
5555 %call.i = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i32 0, i32 0), i8* %add.ptr, double %conv.i, i32 %conv3.i) nounwind optsize, !dbg !44
7878 !11 = !MDBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
7979 !12 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13)
8080 !13 = !MDBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char)
81
82 !58 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !0, file: !1, type: !9, inlinedAt: !40)
83 !60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !0, file: !1, type: !11, inlinedAt: !40)
84 !62 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13, inlinedAt: !40)
85
8186 !14 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 11, arg: 1, scope: !6, file: !1, type: !9)
8287 !15 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 11, arg: 2, scope: !6, file: !1, type: !11)
8388 !16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 11, arg: 3, scope: !6, file: !1, type: !13)
5757 !5 = !MDSubroutineType(types: !6)
5858 !6 = !{null}
5959 !7 = !MDLocation(line: 810, scope: !1)
60 !8 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "data", line: 201, arg: 0, scope: !9, file: !10, type: !11)
60 !8 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "data", line: 201, arg: 0, scope: !9, file: !10, type: !11, inlinedAt: !7)
6161 !9 = !MDSubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: null, type: !5)
6262 !10 = !MDFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc")
6363 !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "uint64_t", line: 59, file: !36, scope: !3, baseType: !13)
1414 define i32 @bar() nounwind ssp {
1515 entry:
1616 %0 = load i32, i32* @i, align 4, !dbg !17 ; [#uses=2]
17 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !9, metadata !MDExpression()), !dbg !19
18 tail call void @llvm.dbg.declare(metadata !29, metadata !10, metadata !MDExpression()), !dbg !21
17 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !59, metadata !MDExpression()), !dbg !19
18 tail call void @llvm.dbg.declare(metadata !29, metadata !60, metadata !MDExpression()), !dbg !21
1919 %1 = mul nsw i32 %0, %0, !dbg !22 ; [#uses=2]
2020 store i32 %1, i32* @i, align 4, !dbg !17
2121 ret i32 %1, !dbg !23
3535 !8 = !{!5}
3636 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
3737 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
38
39 !59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5, inlinedAt: !17)
40 !60 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12, inlinedAt: !17)
41
3842 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
3943 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
4044 !13 = !{!14, !15}
1414 define i32 @bar() nounwind ssp {
1515 entry:
1616 %0 = load i32, i32* @i, align 4, !dbg !17 ; [#uses=2]
17 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !9, metadata !MDExpression()), !dbg !19
18 tail call void @llvm.dbg.declare(metadata !29, metadata !10, metadata !MDExpression()), !dbg !21
17 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !59, metadata !MDExpression()), !dbg !19
18 tail call void @llvm.dbg.declare(metadata !29, metadata !60, metadata !MDExpression()), !dbg !21
1919 %1 = mul nsw i32 %0, %0, !dbg !22 ; [#uses=2]
2020 store i32 %1, i32* @i, align 4, !dbg !17
2121 ret i32 %1, !dbg !23
3535 !8 = !{!5}
3636 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
3737 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
38
39 !59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5, inlinedAt: !17)
40 !60 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12, inlinedAt: !17)
41
3842 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
3943 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
4044 !13 = !{!14, !15}
7373
7474 cleanup.action: ; preds = %land.end
7575 store %struct.C* %agg.tmp.ensured, %struct.C** %this.addr.i, align 8, !dbg !22
76 call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i, metadata !29, metadata !MDExpression()), !dbg !31
76 call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i, metadata !129, metadata !MDExpression()), !dbg !31
7777 %this1.i = load %struct.C*, %struct.C** %this.addr.i, !dbg !22
7878 store %struct.C* %this1.i, %struct.C** %this.addr.i.i, align 8, !dbg !21
79 call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i.i, metadata !32, metadata !MDExpression()), !dbg !33
79 call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i.i, metadata !132, metadata !MDExpression()), !dbg !33
8080 %this1.i.i = load %struct.C*, %struct.C** %this.addr.i.i, !dbg !21
8181 br label %cleanup.done, !dbg !22
8282
9393 call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !29, metadata !MDExpression()), !dbg !38
9494 %this1 = load %struct.C*, %struct.C** %this.addr
9595 store %struct.C* %this1, %struct.C** %this.addr.i, align 8, !dbg !37
96 call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i, metadata !32, metadata !MDExpression()), !dbg !39
96 call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i, metadata !232, metadata !MDExpression()), !dbg !39
9797 %this1.i = load %struct.C*, %struct.C** %this.addr.i, !dbg !37
9898 ret void, !dbg !37
9999 }
153153 !31 = !MDLocation(line: 0, scope: !17, inlinedAt: !22)
154154 !32 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30)
155155 !33 = !MDLocation(line: 0, scope: !16, inlinedAt: !21)
156
157 !129 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !30, inlinedAt: !22)
158 !132 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30, inlinedAt: !21)
159 !232 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30, inlinedAt: !37)
160
156161 !34 = !MDLocation(line: 5, scope: !35)
157162 !35 = distinct !MDLexicalBlock(line: 5, column: 0, file: !5, scope: !36)
158163 !36 = distinct !MDLexicalBlock(line: 5, column: 0, file: !5, scope: !12)
1414 define i32 @bar() nounwind ssp {
1515 entry:
1616 %0 = load i32, i32* @i, align 4, !dbg !17 ; [#uses=2]
17 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !9, metadata !MDExpression()), !dbg !19
18 tail call void @llvm.dbg.declare(metadata !29, metadata !10, metadata !MDExpression()), !dbg !21
17 tail call void @llvm.dbg.value(metadata i32 %0, i64 0, metadata !109, metadata !MDExpression()), !dbg !19
18 tail call void @llvm.dbg.declare(metadata !29, metadata !110, metadata !MDExpression()), !dbg !21
1919 %1 = mul nsw i32 %0, %0, !dbg !22 ; [#uses=2]
2020 store i32 %1, i32* @i, align 4, !dbg !17
2121 ret i32 %1, !dbg !23
3535 !8 = !{!5}
3636 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
3737 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
38
39 !109 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5, inlinedAt: !17)
40 !110 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12, inlinedAt: !17)
41
3842 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
3943 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
4044 !13 = !{!14, !15}
6060
6161 define void @foobar() nounwind optsize ssp {
6262 entry:
63 tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !9, metadata !MDExpression()) nounwind, !dbg !31
64 tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !18, metadata !MDExpression()) nounwind, !dbg !35
63 tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !109, metadata !MDExpression()) nounwind, !dbg !31
64 tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !118, metadata !MDExpression()) nounwind, !dbg !35
6565 store i32 1, i32* getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 1), align 8, !dbg !36
6666 %call.i = tail call float* @bar(i32 1) nounwind optsize, !dbg !37
6767 store float* %call.i, float** getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 0), align 8, !dbg !37
8282 !6 = !MDSubprogram(name: "foobar", line: 15, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: true, file: !1, scope: !1, type: !7, function: void ()* @foobar)
8383 !7 = !MDSubroutineType(types: !8)
8484 !8 = !{null}
85 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10, inlinedAt: !32)
85 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10)
86
87 !109 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10, inlinedAt: !32)
88
8689 !10 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !11)
8790 !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "S1", line: 4, file: !42, scope: !2, baseType: !12)
8891 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "S1", line: 1, size: 128, align: 64, file: !42, scope: !2, elements: !13)
9194 !15 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !16)
9295 !16 = !MDBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
9396 !17 = !MDDerivedType(tag: DW_TAG_member, name: "nums", line: 3, size: 32, align: 32, offset: 64, file: !42, scope: !1, baseType: !5)
94 !18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5, inlinedAt: !32)
97 !18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5)
98
99 !118 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5, inlinedAt: !32)
100
95101 !19 = !MDGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11, variable: %struct.S1* @p)
96102 !20 = !MDLocation(line: 7, column: 13, scope: !0)
97103 !21 = !MDLocation(line: 7, column: 21, scope: !0)
8787 !21 = !{i32 1, !"Debug Info Version", i32 3}
8888 !22 = !{!"clang version 3.5.0 "}
8989 !23 = !MDLocation(line: 8, scope: !13)
90 !24 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !25)
90 !24 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !25, inlinedAt: !23)
9191 !25 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
9292 !26 = !MDLocation(line: 0, scope: !17, inlinedAt: !23)
93 !27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 2, arg: 2, scope: !17, file: !14, type: !9)
93 !27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 2, arg: 2, scope: !17, file: !14, type: !9, inlinedAt: !23)
9494 !28 = !MDLocation(line: 2, scope: !17, inlinedAt: !23)
6666 !16 = !MDDerivedType(tag: DW_TAG_volatile_type, baseType: !11)
6767 !17 = !MDLocation(line: 5, scope: !4)
6868 !18 = !MDLocation(line: 6, column: 7, scope: !4)
69 !19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 1, arg: 1, scope: !8, file: !5, type: !11)
69 !19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 1, arg: 1, scope: !8, file: !5, type: !11, inlinedAt: !18)
7070 !20 = !MDLocation(line: 1, scope: !8, inlinedAt: !18)
7171 !21 = !MDLocation(line: 2, scope: !8, inlinedAt: !18)
7272 !22 = !MDLocation(line: 7, scope: !4)
7474 %1 = bitcast i32* %x.addr.i to i8*
7575 call void @llvm.lifetime.start(i64 4, i8* %1)
7676 store i32 %0, i32* %x.addr.i, align 4
77 call void @llvm.dbg.declare(metadata i32* %x.addr.i, metadata !20, metadata !MDExpression()), !dbg !21
77 call void @llvm.dbg.declare(metadata i32* %x.addr.i, metadata !120, metadata !MDExpression()), !dbg !21
7878 %2 = load i32, i32* %x.addr.i, align 4, !dbg !22
7979 %mul.i = mul nsw i32 %2, 2, !dbg !22
8080 %3 = bitcast i32* %x.addr.i to i8*, !dbg !22
132132 !18 = !{!"clang version 3.5.0 "}
133133 !19 = !MDLocation(line: 4, scope: !4)
134134 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 1, scope: !12, file: !13, type: !8)
135
136 !120 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 1, scope: !12, file: !13, type: !8, inlinedAt: !19)
137
135138 !21 = !MDLocation(line: 1, scope: !12, inlinedAt: !19)
136139 !22 = !MDLocation(line: 2, scope: !12, inlinedAt: !19)
137140 !23 = !MDLocation(line: 1, scope: !12)
110110 !13 = !{i32 2, !"Dwarf Version", i32 4}
111111 !14 = !{i32 1, !"Debug Info Version", i32 3}
112112 !15 = !{!"clang version 3.5.0 "}
113 !16 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 3, scope: !17, file: !11, type: !18)
113 !16 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 3, scope: !17, file: !11, type: !18, inlinedAt: !20)
114114 !17 = distinct !MDLexicalBlock(line: 3, column: 0, file: !1, scope: !12)
115115 !18 = !MDBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
116116 !19 = !MDLocation(line: 3, scope: !17, inlinedAt: !20)
118118 !21 = !MDLocation(line: 4, scope: !17, inlinedAt: !20)
119119 !22 = !MDLocation(line: 5, scope: !12, inlinedAt: !20)
120120 !23 = !MDLocation(line: 6, scope: !12, inlinedAt: !20)
121 !24 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 2, scope: !25, file: !6, type: !18)
121 !24 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 2, scope: !25, file: !6, type: !18, inlinedAt: !28)
122122 !25 = distinct !MDLexicalBlock(line: 2, column: 0, file: !5, scope: !26)
123123 !26 = !MDLexicalBlockFile(discriminator: 0, file: !5, scope: !10)
124124 !27 = !MDLocation(line: 2, scope: !25, inlinedAt: !28)
4141 store i32 0, i32* %retval
4242 %0 = load i32, i32* @x, align 4, !dbg !16
4343 store i32 %0, i32* %i.addr.i, align 4
44 call void @llvm.dbg.declare(metadata i32* %i.addr.i, metadata !17, metadata !MDExpression()), !dbg !18
44 call void @llvm.dbg.declare(metadata i32* %i.addr.i, metadata !117, metadata !MDExpression()), !dbg !18
4545 %1 = load i32, i32* %i.addr.i, align 4, !dbg !18
4646 %mul.i = mul nsw i32 %1, 2, !dbg !18
4747 ret i32 %mul.i, !dbg !16
8787 !15 = !{!"clang version 3.5.0 "}
8888 !16 = !MDLocation(line: 5, scope: !4)
8989 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 6, arg: 1, scope: !9, file: !5, type: !8)
90
91 !117 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 6, arg: 1, scope: !9, file: !5, type: !8, inlinedAt: !16)
92
9093 !18 = !MDLocation(line: 6, scope: !9, inlinedAt: !16)
9194 !19 = !MDLocation(line: 6, scope: !9)
4040 !6 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
4141 !7 = !MDLocation(line: 8, scope: !1)
4242 !8 = !MDLocation(line: 9, scope: !1)
43 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 0, scope: !10, file: !2, type: !6)
43 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 0, scope: !10, file: !2, type: !6, inlinedAt: !8)
4444 !10 = !MDSubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !20, scope: !2, type: !11)
4545 !11 = !MDSubroutineType(types: !12)
4646 !12 = !{null, !6, !13, !14}
4747 !13 = !MDBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed)
4848 !14 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !20, scope: !2, baseType: null)
4949 !15 = !MDLocation(line: 4, scope: !10, inlinedAt: !8)
50 !16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 4, arg: 0, scope: !10, file: !2, type: !13)
51 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 4, arg: 0, scope: !10, file: !2, type: !14)
50 !16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 4, arg: 0, scope: !10, file: !2, type: !13, inlinedAt: !8)
51 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 4, arg: 0, scope: !10, file: !2, type: !14, inlinedAt: !8)
5252 !18 = !MDLocation(line: 5, scope: !10, inlinedAt: !8)
5353 !19 = !MDLocation(line: 10, scope: !1)
5454 !20 = !MDFile(filename: "bar.c", directory: "/tmp/")