[llvm] r273585 - Preserve DebugInfo when replacing values in DAGCombiner
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 10:52:57 PDT 2016
Author: niravd
Date: Thu Jun 23 12:52:57 2016
New Revision: 273585
URL: http://llvm.org/viewvc/llvm-project?rev=273585&view=rev
Log:
Preserve DebugInfo when replacing values in DAGCombiner
Recommiting after correcting over-eager Debug Value transfer fixing PR28270.
[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.
Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.
This refixes PR9817 which was being incompletely checked in the
testsuite.
Reviewers: jyknight
Subscribers: dblaikie, llvm-commits
Differential Revision: http://reviews.llvm.org/D21037
Added:
llvm/trunk/test/DebugInfo/X86/pr28270.ll
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/trunk/test/DebugInfo/X86/dbg-value-dag-combine.ll
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Thu Jun 23 12:52:57 2016
@@ -1221,9 +1221,11 @@ public:
return DbgInfo->getSDDbgValues(SD);
}
- /// Transfer SDDbgValues.
+private:
+ /// Transfer SDDbgValues. Called via ReplaceAllUses{OfValue}?With
void TransferDbgValues(SDValue From, SDValue To);
+public:
/// Return true if there are any SDDbgValue nodes associated
/// with this SelectionDAG.
bool hasDebugValues() const { return !DbgInfo->empty(); }
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Jun 23 12:52:57 2016
@@ -1333,8 +1333,6 @@ void DAGCombiner::Run(CombineLevel AtLev
DEBUG(dbgs() << " ... into: ";
RV.getNode()->dump(&DAG));
- // Transfer debug value.
- DAG.TransferDbgValues(SDValue(N, 0), RV);
if (N->getNumValues() == RV.getNode()->getNumValues())
DAG.ReplaceAllUsesWith(N, RV.getNode());
else {
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/InstrEmitter.cpp Thu Jun 23 12:52:57 2016
@@ -320,7 +320,6 @@ InstrEmitter::AddRegisterOperand(Machine
"Chain and glue operands should occur at end of operand list!");
// Get/emit the operand.
unsigned VReg = getVR(Op, VRBaseMap);
- assert(TargetRegisterInfo::isVirtualRegister(VReg) && "Not a vreg?");
const MCInstrDesc &MCID = MIB->getDesc();
bool isOptDef = IIOpNum < MCID.getNumOperands() &&
@@ -334,6 +333,8 @@ InstrEmitter::AddRegisterOperand(Machine
const TargetRegisterClass *DstRC = nullptr;
if (IIOpNum < II->getNumOperands())
DstRC = TRI->getAllocatableClass(TII->getRegClass(*II,IIOpNum,TRI,*MF));
+ assert((!DstRC || TargetRegisterInfo::isVirtualRegister(VReg)) &&
+ "Expected VReg");
if (DstRC && !MRI->constrainRegClass(VReg, DstRC, MinRCSize)) {
unsigned NewVReg = MRI->createVirtualRegister(DstRC);
BuildMI(*MBB, InsertPos, Op.getNode()->getDebugLoc(),
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Thu Jun 23 12:52:57 2016
@@ -179,8 +179,6 @@ public:
"Replacing one node with another that produces a different number "
"of values!");
DAG.ReplaceAllUsesWith(Old, New);
- for (unsigned i = 0, e = Old->getNumValues(); i != e; ++i)
- DAG.TransferDbgValues(SDValue(Old, i), SDValue(New, i));
if (UpdatedNodes)
UpdatedNodes->insert(New);
ReplacedNode(Old);
@@ -190,7 +188,6 @@ public:
dbgs() << " with: "; New->dump(&DAG));
DAG.ReplaceAllUsesWith(Old, New);
- DAG.TransferDbgValues(Old, New);
if (UpdatedNodes)
UpdatedNodes->insert(New.getNode());
ReplacedNode(Old.getNode());
@@ -203,7 +200,6 @@ public:
DEBUG(dbgs() << (i == 0 ? " with: "
: " and: ");
New[i]->dump(&DAG));
- DAG.TransferDbgValues(SDValue(Old, i), New[i]);
if (UpdatedNodes)
UpdatedNodes->insert(New[i].getNode());
}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Thu Jun 23 12:52:57 2016
@@ -6333,6 +6333,9 @@ void SelectionDAG::ReplaceAllUsesWith(SD
AddModifiedNodeToCSEMaps(User);
}
+ // Preserve Debug Values
+ TransferDbgValues(FromN, To);
+
// If we just RAUW'd the root, take note.
if (FromN == getRoot())
setRoot(To);
@@ -6356,6 +6359,13 @@ void SelectionDAG::ReplaceAllUsesWith(SD
if (From == To)
return;
+ // Preserve Debug Info. Only do this if there's a use.
+ for (unsigned i = 0, e = From->getNumValues(); i != e; ++i)
+ if (From->hasAnyUseOfValue(i)) {
+ assert((i < To->getNumValues()) && "Invalid To location");
+ TransferDbgValues(SDValue(From, i), SDValue(To, i));
+ }
+
// Iterate over just the existing users of From. See the comments in
// the ReplaceAllUsesWith above.
SDNode::use_iterator UI = From->use_begin(), UE = From->use_end();
@@ -6395,6 +6405,10 @@ void SelectionDAG::ReplaceAllUsesWith(SD
if (From->getNumValues() == 1) // Handle the simple case efficiently.
return ReplaceAllUsesWith(SDValue(From, 0), To[0]);
+ // Preserve Debug Info.
+ for (unsigned i = 0, e = From->getNumValues(); i != e; ++i)
+ TransferDbgValues(SDValue(From, i), *To);
+
// Iterate over just the existing users of From. See the comments in
// the ReplaceAllUsesWith above.
SDNode::use_iterator UI = From->use_begin(), UE = From->use_end();
@@ -6439,6 +6453,9 @@ void SelectionDAG::ReplaceAllUsesOfValue
return;
}
+ // Preserve Debug Info.
+ TransferDbgValues(From, To);
+
// Iterate over just the existing users of From. See the comments in
// the ReplaceAllUsesWith above.
SDNode::use_iterator UI = From.getNode()->use_begin(),
@@ -6513,6 +6530,8 @@ void SelectionDAG::ReplaceAllUsesOfValue
if (Num == 1)
return ReplaceAllUsesOfValueWith(*From, *To);
+ TransferDbgValues(*From, *To);
+
// Read up all the uses and make records of them. This helps
// processing new uses that are introduced during the
// replacement process.
@@ -6661,28 +6680,26 @@ void SelectionDAG::AddDbgValue(SDDbgValu
DbgInfo->add(DB, SD, isParameter);
}
-/// TransferDbgValues - Transfer SDDbgValues.
+/// TransferDbgValues - Transfer SDDbgValues. Called in replace nodes.
void SelectionDAG::TransferDbgValues(SDValue From, SDValue To) {
if (From == To || !From.getNode()->getHasDebugValue())
return;
SDNode *FromNode = From.getNode();
SDNode *ToNode = To.getNode();
ArrayRef<SDDbgValue *> DVs = GetDbgValues(FromNode);
- SmallVector<SDDbgValue *, 2> ClonedDVs;
for (ArrayRef<SDDbgValue *>::iterator I = DVs.begin(), E = DVs.end();
I != E; ++I) {
SDDbgValue *Dbg = *I;
- if (Dbg->getKind() == SDDbgValue::SDNODE) {
+ // Only add Dbgvalues attached to same ResNo.
+ if (Dbg->getKind() == SDDbgValue::SDNODE &&
+ Dbg->getResNo() == From.getResNo()) {
SDDbgValue *Clone =
getDbgValue(Dbg->getVariable(), Dbg->getExpression(), ToNode,
To.getResNo(), Dbg->isIndirect(), Dbg->getOffset(),
Dbg->getDebugLoc(), Dbg->getOrder());
- ClonedDVs.push_back(Clone);
+ AddDbgValue(Clone, ToNode, false);
}
}
- for (SmallVectorImpl<SDDbgValue *>::iterator I = ClonedDVs.begin(),
- E = ClonedDVs.end(); I != E; ++I)
- AddDbgValue(*I, ToNode, false);
}
//===----------------------------------------------------------------------===//
Modified: llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp Thu Jun 23 12:52:57 2016
@@ -1308,8 +1308,6 @@ void HexagonDAGToDAGISel::SelectFrameInd
R = CurDAG->getMachineNode(Hexagon::TFR_FIA, DL, MVT::i32, Ops);
}
- if (N->getHasDebugValue())
- CurDAG->TransferDbgValues(SDValue(N, 0), SDValue(R, 0));
ReplaceNode(N, R);
}
Modified: llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonISelLowering.cpp Thu Jun 23 12:52:57 2016
@@ -1058,8 +1058,8 @@ HexagonTargetLowering::LowerDYNAMIC_STAC
SDValue AC = DAG.getConstant(A, dl, MVT::i32);
SDVTList VTs = DAG.getVTList(MVT::i32, MVT::Other);
SDValue AA = DAG.getNode(HexagonISD::ALLOCA, dl, VTs, Chain, Size, AC);
- if (Op.getNode()->getHasDebugValue())
- DAG.TransferDbgValues(Op, AA);
+
+ DAG.ReplaceAllUsesOfValueWith(Op, AA);
return AA;
}
Modified: llvm/trunk/test/DebugInfo/X86/dbg-value-dag-combine.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dbg-value-dag-combine.ll?rev=273585&r1=273584&r2=273585&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dbg-value-dag-combine.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dbg-value-dag-combine.ll Thu Jun 23 12:52:57 2016
@@ -3,6 +3,13 @@ target datalayout = "e-p:32:32:32-i1:8:8
target triple = "i686-apple-darwin"
; PR 9817
+; There should be a DEBUG_VALUE for each call to llvm.dbg.value
+
+; CHECK: ##DEBUG_VALUE: __OpenCL_test_kernel:ip <-
+; CHECK: ##DEBUG_VALUE: xxx <- 0
+; CHECK: ##DEBUG_VALUE: gid <- %E{{..$}}
+; CHECK: ##DEBUG_VALUE: idx <- %E{{..$}}
+; CHECK-NOT: ##DEBUG_VALUE:
declare <4 x i32> @__amdil_get_global_id_int()
declare void @llvm.dbg.value(metadata, i64, metadata, metadata)
@@ -12,10 +19,9 @@ entry:
%0 = call <4 x i32> @__amdil_get_global_id_int() nounwind
%1 = extractelement <4 x i32> %0, i32 0
call void @llvm.dbg.value(metadata i32 %1, i64 0, metadata !9, metadata !DIExpression()), !dbg !11
- call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !13, metadata !DIExpression()), !dbg !14
+ call void @llvm.dbg.value(metadata i32 0, i64 0, metadata !21, metadata !DIExpression()), !dbg !14
%tmp2 = load i32, i32 addrspace(1)* %ip, align 4, !dbg !15
%tmp3 = add i32 0, %tmp2, !dbg !15
-; CHECK: ##DEBUG_VALUE: idx <- %E{{..$}}
call void @llvm.dbg.value(metadata i32 %tmp3, i64 0, metadata !13, metadata !DIExpression()), !dbg !15
%arrayidx = getelementptr i32, i32 addrspace(1)* %ip, i32 %1, !dbg !16
store i32 %tmp3, i32 addrspace(1)* %arrayidx, align 4, !dbg !16
@@ -44,3 +50,4 @@ entry:
!17 = !DILocation(line: 7, column: 1, scope: !0)
!19 = !DIFile(filename: "OCL6368.tmp.cl", directory: "E:\5CUsers\5Cmvillmow.AMD\5CAppData\5CLocal\5CTemp")
!20 = !{i32 1, !"Debug Info Version", i32 3}
+!21 = !DILocalVariable(name: "xxx", line: 4, scope: !10, file: !1, type: !6)
Added: llvm/trunk/test/DebugInfo/X86/pr28270.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/pr28270.ll?rev=273585&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/pr28270.ll (added)
+++ llvm/trunk/test/DebugInfo/X86/pr28270.ll Thu Jun 23 12:52:57 2016
@@ -0,0 +1,151 @@
+; RUN: llc %s
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+%class.A = type { i8 }
+%class.B = type { i8 }
+
+ at .str = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
+ at .str.1 = private unnamed_addr constant [6 x i8] c"false\00", align 1
+
+define void @_Z11PrintVectorv() local_unnamed_addr #0 !dbg !6 {
+entry:
+ %agg.tmp.i.i = alloca %class.A, align 1
+ %text.i = alloca %class.A, align 1
+ %v = alloca %class.B, align 1
+ %0 = getelementptr inbounds %class.B, %class.B* %v, i64 0, i32 0, !dbg !40
+ call void @llvm.lifetime.start(i64 1, i8* %0) #4, !dbg !40
+ %1 = getelementptr inbounds %class.A, %class.A* %text.i, i64 0, i32 0, !dbg !41
+ %2 = getelementptr inbounds %class.A, %class.A* %agg.tmp.i.i, i64 0, i32 0, !dbg !59
+ br label %for.cond, !dbg !65
+
+for.cond: ; preds = %for.cond, %entry
+ call void @llvm.dbg.value(metadata %class.B* %v, i64 0, metadata !29, metadata !66), !dbg !67
+ %call = call double @_ZN1BixEj(%class.B* nonnull %v, i32 undef), !dbg !68
+ call void @llvm.dbg.value(metadata double %call, i64 0, metadata !49, metadata !69), !dbg !70
+ call void @llvm.dbg.value(metadata i32* null, i64 0, metadata !52, metadata !69), !dbg !71
+ call void @llvm.dbg.value(metadata %class.A* undef, i64 0, metadata !54, metadata !69), !dbg !72
+ call void @llvm.lifetime.start(i64 1, i8* %1) #4, !dbg !41
+ %tobool.i = fcmp une double %call, 0.000000e+00, !dbg !73
+ %cond.i = select i1 %tobool.i, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), !dbg !73
+ call void @llvm.dbg.value(metadata %class.A* %text.i, i64 0, metadata !55, metadata !66), !dbg !74
+ call void @llvm.lifetime.start(i64 1, i8* %2), !dbg !59
+ call void @llvm.dbg.value(metadata %class.A* %text.i, i64 0, metadata !62, metadata !69), !dbg !59
+ call void @llvm.dbg.value(metadata i8* %cond.i, i64 0, metadata !63, metadata !69), !dbg !75
+ call void @_ZN1AC1EPKc(%class.A* nonnull %agg.tmp.i.i, i8* %cond.i), !dbg !76
+ call void @_ZN1A5m_fn1ES_(%class.A* nonnull %text.i), !dbg !77
+ call void @llvm.lifetime.end(i64 1, i8* %2), !dbg !79
+ call void @llvm.lifetime.end(i64 1, i8* %1) #4, !dbg !80
+ br label %for.cond, !dbg !81, !llvm.loop !82
+}
+
+; Function Attrs: argmemonly nounwind
+declare void @llvm.lifetime.start(i64, i8* nocapture) #1
+
+declare double @_ZN1BixEj(%class.B*, i32) local_unnamed_addr #2
+
+; Function Attrs: argmemonly nounwind
+declare void @llvm.lifetime.end(i64, i8* nocapture) #1
+
+declare void @_ZN1A5m_fn1ES_(%class.A*) local_unnamed_addr #2
+
+declare void @_ZN1AC1EPKc(%class.A*, i8*) unnamed_addr #2
+
+; Function Attrs: nounwind readnone
+declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #3
+
+attributes #0 = { noreturn uwtable "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #1 = { argmemonly nounwind }
+attributes #2 = { "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
+attributes #3 = { nounwind readnone }
+attributes #4 = { nounwind }
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!3, !4}
+!llvm.ident = !{!5}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.9.0 (trunk 273450) (llvm/trunk 273521)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
+!1 = !DIFile(filename: "/usr/local/google/home/niravd/bug_28270.c", directory: "/usr/local/google/home/niravd/build/llvm/build_debug")
+!2 = !{}
+!3 = !{i32 2, !"Dwarf Version", i32 4}
+!4 = !{i32 2, !"Debug Info Version", i32 3}
+!5 = !{!"clang version 3.9.0 (trunk 273450) (llvm/trunk 273521)"}
+!6 = distinct !DISubprogram(name: "PrintVector", linkageName: "_Z11PrintVectorv", scope: !1, file: !1, line: 18, type: !7, isLocal: false, isDefinition: true, scopeLine: 18, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !9)
+!7 = !DISubroutineType(types: !8)
+!8 = !{null}
+!9 = !{!10, !25, !27, !28, !29, !38}
+!10 = !DILocalVariable(name: "_text", scope: !6, file: !1, line: 19, type: !11)
+!11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64, align: 64)
+!12 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A", file: !1, line: 1, size: 8, align: 8, elements: !13, identifier: "_ZTS1A")
+!13 = !{!14, !21, !22}
+!14 = !DISubprogram(name: "A", scope: !12, file: !1, line: 2, type: !15, isLocal: false, isDefinition: false, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true)
+!15 = !DISubroutineType(types: !16)
+!16 = !{null, !17, !18}
+!17 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !19, size: 64, align: 64)
+!19 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !20)
+!20 = !DIBasicType(name: "char", size: 8, align: 8, encoding: DW_ATE_signed_char)
+!21 = !DISubprogram(name: "operator+=", linkageName: "_ZN1ApLEPKc", scope: !12, file: !1, line: 5, type: !15, isLocal: false, isDefinition: false, scopeLine: 5, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
+!22 = !DISubprogram(name: "m_fn1", linkageName: "_ZN1A5m_fn1ES_", scope: !12, file: !1, line: 6, type: !23, isLocal: false, isDefinition: false, scopeLine: 6, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
+!23 = !DISubroutineType(types: !24)
+!24 = !{null, !17, !12}
+!25 = !DILocalVariable(name: "opts", scope: !6, file: !1, line: 20, type: !26)
+!26 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
+!27 = !DILocalVariable(name: "indent", scope: !6, file: !1, line: 20, type: !26)
+!28 = !DILocalVariable(name: "type", scope: !6, file: !1, line: 20, type: !26)
+!29 = !DILocalVariable(name: "v", scope: !6, file: !1, line: 21, type: !30)
+!30 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "B", file: !1, line: 9, size: 8, align: 8, elements: !31, identifier: "_ZTS1B")
+!31 = !{!32}
+!32 = !DISubprogram(name: "operator[]", linkageName: "_ZN1BixEj", scope: !30, file: !1, line: 11, type: !33, isLocal: false, isDefinition: false, scopeLine: 11, flags: DIFlagPublic | DIFlagPrototyped, isOptimized: true)
+!33 = !DISubroutineType(types: !34)
+!34 = !{!35, !36, !37}
+!35 = !DIBasicType(name: "double", size: 64, align: 64, encoding: DW_ATE_float)
+!36 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !30, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer)
+!37 = !DIBasicType(name: "unsigned int", size: 32, align: 32, encoding: DW_ATE_unsigned)
+!38 = !DILocalVariable(name: "i", scope: !39, file: !1, line: 22, type: !26)
+!39 = distinct !DILexicalBlock(scope: !6, file: !1, line: 22, column: 3)
+!40 = !DILocation(line: 21, column: 3, scope: !6)
+!41 = !DILocation(line: 14, column: 3, scope: !42, inlinedAt: !56)
+!42 = distinct !DISubprogram(name: "Print<double>", linkageName: "_Z5PrintIdEvT_iiPiiP1A", scope: !1, file: !1, line: 13, type: !43, isLocal: false, isDefinition: true, scopeLine: 13, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !46, variables: !48)
+!43 = !DISubroutineType(types: !44)
+!44 = !{null, !35, !26, !26, !45, !26, !11}
+!45 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !26, size: 64, align: 64)
+!46 = !{!47}
+!47 = !DITemplateTypeParameter(name: "T", type: !35)
+!48 = !{!49, !50, !51, !52, !53, !54, !55}
+!49 = !DILocalVariable(name: "p1", arg: 1, scope: !42, file: !1, line: 13, type: !35)
+!50 = !DILocalVariable(arg: 2, scope: !42, file: !1, line: 13, type: !26)
+!51 = !DILocalVariable(arg: 3, scope: !42, file: !1, line: 13, type: !26)
+!52 = !DILocalVariable(arg: 4, scope: !42, file: !1, line: 13, type: !45)
+!53 = !DILocalVariable(arg: 5, scope: !42, file: !1, line: 13, type: !26)
+!54 = !DILocalVariable(name: "p6", arg: 6, scope: !42, file: !1, line: 13, type: !11)
+!55 = !DILocalVariable(name: "text", scope: !42, file: !1, line: 14, type: !12)
+!56 = distinct !DILocation(line: 23, column: 5, scope: !57)
+!57 = !DILexicalBlockFile(scope: !58, file: !1, discriminator: 1)
+!58 = distinct !DILexicalBlock(scope: !39, file: !1, line: 22, column: 3)
+!59 = !DILocation(line: 0, scope: !60, inlinedAt: !64)
+!60 = distinct !DISubprogram(name: "operator+=", linkageName: "_ZN1ApLEPKc", scope: !12, file: !1, line: 5, type: !15, isLocal: false, isDefinition: true, scopeLine: 5, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !21, variables: !61)
+!61 = !{!62, !63}
+!62 = !DILocalVariable(name: "this", arg: 1, scope: !60, type: !11, flags: DIFlagArtificial | DIFlagObjectPointer)
+!63 = !DILocalVariable(name: "p1", arg: 2, scope: !60, file: !1, line: 5, type: !18)
+!64 = distinct !DILocation(line: 15, column: 8, scope: !42, inlinedAt: !56)
+!65 = !DILocation(line: 22, column: 8, scope: !39)
+!66 = !DIExpression(DW_OP_deref)
+!67 = !DILocation(line: 21, column: 5, scope: !6)
+!68 = !DILocation(line: 23, column: 11, scope: !58)
+!69 = !DIExpression()
+!70 = !DILocation(line: 13, column: 36, scope: !42, inlinedAt: !56)
+!71 = !DILocation(line: 13, column: 55, scope: !42, inlinedAt: !56)
+!72 = !DILocation(line: 13, column: 65, scope: !42, inlinedAt: !56)
+!73 = !DILocation(line: 15, column: 11, scope: !42, inlinedAt: !56)
+!74 = !DILocation(line: 14, column: 5, scope: !42, inlinedAt: !56)
+!75 = !DILocation(line: 5, column: 31, scope: !60, inlinedAt: !64)
+!76 = !DILocation(line: 5, column: 43, scope: !60, inlinedAt: !64)
+!77 = !DILocation(line: 5, column: 37, scope: !78, inlinedAt: !64)
+!78 = !DILexicalBlockFile(scope: !60, file: !1, discriminator: 1)
+!79 = !DILocation(line: 5, column: 48, scope: !60, inlinedAt: !64)
+!80 = !DILocation(line: 16, column: 1, scope: !42, inlinedAt: !56)
+!81 = !DILocation(line: 22, column: 3, scope: !57)
+!82 = distinct !{!82, !83}
+!83 = !DILocation(line: 22, column: 3, scope: !6)
More information about the llvm-commits
mailing list