[llvm] r353203 - [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 5 11:33:47 PST 2019
Author: abataev
Date: Tue Feb 5 11:33:47 2019
New Revision: 353203
URL: http://llvm.org/viewvc/llvm-project?rev=353203&view=rev
Log:
[DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger.
Summary:
According to
https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf,
the compiler should emit the DW_AT_address_class attribute for all
variable and parameter. It means, that DW_AT_address_class attribute
should be used in the non-standard way to support compatibility with the
cuda-gdb debugger.
Clang is able to generate the information about the variable address
class. This information is emitted as the expression sequence
`DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef`. The patch
tries to find all such expressions and transform them into
`DW_AT_address_class <DWARF Address Space>` if target is NVPTX and the debugger is gdb.
If the expression is not found, then default values are used. For the
local variables <DWARF Address Space> is set to ADDR_local_space(6), for
the globals <DWARF Address Space> is set to ADDR_global_space(5). The
values are taken from the table in the same section 5.2. CUDA-Specific
DWARF Definitions.
Reviewers: echristo, probinson
Subscribers: jholewinski, aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D57157
Added:
llvm/trunk/test/DebugInfo/NVPTX/debug-addr-class.ll
Modified:
llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/lib/IR/DebugInfoMetadata.cpp
llvm/trunk/test/DebugInfo/NVPTX/dbg-declare-alloca.ll
Modified: llvm/trunk/include/llvm/IR/DebugInfoMetadata.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfoMetadata.h?rev=353203&r1=353202&r2=353203&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DebugInfoMetadata.h (original)
+++ llvm/trunk/include/llvm/IR/DebugInfoMetadata.h Tue Feb 5 11:33:47 2019
@@ -2510,6 +2510,12 @@ public:
/// return true with an offset of zero.
bool extractIfOffset(int64_t &Offset) const;
+ /// Checks if the last 4 elements of the expression are DW_OP_constu <DWARF
+ /// Address Space> DW_OP_swap DW_OP_xderef and extracts the <DWARF Address
+ /// Space>.
+ static const DIExpression *extractAddressClass(const DIExpression *Expr,
+ unsigned &AddrClass);
+
/// Constants for DIExpression::prepend.
enum { NoDeref = false, WithDeref = true, WithStackValue = true };
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=353203&r1=353202&r2=353203&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Tue Feb 5 11:33:47 2019
@@ -167,6 +167,7 @@ DIE *DwarfCompileUnit::getOrCreateGlobal
// Add location.
bool addToAccelTable = false;
DIELoc *Loc = nullptr;
+ Optional<unsigned> NVPTXAddressSpace;
std::unique_ptr<DIEDwarfExpression> DwarfExpr;
for (const auto &GE : GlobalExprs) {
const GlobalVariable *Global = GE.Var;
@@ -200,8 +201,24 @@ DIE *DwarfCompileUnit::getOrCreateGlobal
DwarfExpr = llvm::make_unique<DIEDwarfExpression>(*Asm, *this, *Loc);
}
- if (Expr)
+ if (Expr) {
+ // According to
+ // https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf
+ // cuda-gdb requires DW_AT_address_class for all variables to be able to
+ // correctly interpret address space of the variable address.
+ // Decode DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef
+ // sequence for the NVPTX + gdb target.
+ unsigned LocalNVPTXAddressSpace;
+ if (Asm->TM.getTargetTriple().isNVPTX() && DD->tuneForGDB()) {
+ const DIExpression *NewExpr =
+ DIExpression::extractAddressClass(Expr, LocalNVPTXAddressSpace);
+ if (NewExpr != Expr) {
+ Expr = NewExpr;
+ NVPTXAddressSpace = LocalNVPTXAddressSpace;
+ }
+ }
DwarfExpr->addFragmentOffset(Expr);
+ }
if (Global) {
const MCSymbol *Sym = Asm->getSymbol(Global);
@@ -246,6 +263,15 @@ DIE *DwarfCompileUnit::getOrCreateGlobal
DwarfExpr->setMemoryLocationKind();
DwarfExpr->addExpression(Expr);
}
+ if (Asm->TM.getTargetTriple().isNVPTX() && DD->tuneForGDB()) {
+ // According to
+ // https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf
+ // cuda-gdb requires DW_AT_address_class for all variables to be able to
+ // correctly interpret address space of the variable address.
+ const unsigned NVPTX_ADDR_global_space = 5;
+ addUInt(*VariableDIE, dwarf::DW_AT_address_class, dwarf::DW_FORM_data1,
+ NVPTXAddressSpace ? *NVPTXAddressSpace : NVPTX_ADDR_global_space);
+ }
if (Loc)
addBlock(*VariableDIE, dwarf::DW_AT_location, DwarfExpr->finalize());
@@ -591,6 +617,7 @@ DIE *DwarfCompileUnit::constructVariable
if (!DV.hasFrameIndexExprs())
return VariableDie;
+ Optional<unsigned> NVPTXAddressSpace;
DIELoc *Loc = new (DIEValueAllocator) DIELoc;
DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc);
for (auto &Fragment : DV.getFrameIndexExprs()) {
@@ -602,7 +629,23 @@ DIE *DwarfCompileUnit::constructVariable
SmallVector<uint64_t, 8> Ops;
Ops.push_back(dwarf::DW_OP_plus_uconst);
Ops.push_back(Offset);
- Ops.append(Expr->elements_begin(), Expr->elements_end());
+ // According to
+ // https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf
+ // cuda-gdb requires DW_AT_address_class for all variables to be able to
+ // correctly interpret address space of the variable address.
+ // Decode DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef
+ // sequence for the NVPTX + gdb target.
+ unsigned LocalNVPTXAddressSpace;
+ if (Asm->TM.getTargetTriple().isNVPTX() && DD->tuneForGDB()) {
+ const DIExpression *NewExpr =
+ DIExpression::extractAddressClass(Expr, LocalNVPTXAddressSpace);
+ if (NewExpr != Expr) {
+ Expr = NewExpr;
+ NVPTXAddressSpace = LocalNVPTXAddressSpace;
+ }
+ }
+ if (Expr)
+ Ops.append(Expr->elements_begin(), Expr->elements_end());
DIExpressionCursor Cursor(Ops);
DwarfExpr.setMemoryLocationKind();
if (const MCSymbol *FrameSymbol = Asm->getFunctionFrameSymbol())
@@ -612,6 +655,15 @@ DIE *DwarfCompileUnit::constructVariable
*Asm->MF->getSubtarget().getRegisterInfo(), Cursor, FrameReg);
DwarfExpr.addExpression(std::move(Cursor));
}
+ if (Asm->TM.getTargetTriple().isNVPTX() && DD->tuneForGDB()) {
+ // According to
+ // https://docs.nvidia.com/cuda/archive/10.0/ptx-writers-guide-to-interoperability/index.html#cuda-specific-dwarf
+ // cuda-gdb requires DW_AT_address_class for all variables to be able to
+ // correctly interpret address space of the variable address.
+ const unsigned NVPTX_ADDR_local_space = 6;
+ addUInt(*VariableDie, dwarf::DW_AT_address_class, dwarf::DW_FORM_data1,
+ NVPTXAddressSpace ? *NVPTXAddressSpace : NVPTX_ADDR_local_space);
+ }
addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize());
return VariableDie;
Modified: llvm/trunk/lib/IR/DebugInfoMetadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfoMetadata.cpp?rev=353203&r1=353202&r2=353203&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfoMetadata.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfoMetadata.cpp Tue Feb 5 11:33:47 2019
@@ -928,6 +928,24 @@ bool DIExpression::extractIfOffset(int64
return false;
}
+const DIExpression *DIExpression::extractAddressClass(const DIExpression *Expr,
+ unsigned &AddrClass) {
+ const unsigned PatternSize = 4;
+ if (Expr->Elements.size() >= PatternSize &&
+ Expr->Elements[PatternSize - 4] == dwarf::DW_OP_constu &&
+ Expr->Elements[PatternSize - 2] == dwarf::DW_OP_swap &&
+ Expr->Elements[PatternSize - 1] == dwarf::DW_OP_xderef) {
+ AddrClass = Expr->Elements[PatternSize - 3];
+
+ if (Expr->Elements.size() == PatternSize)
+ return nullptr;
+ return DIExpression::get(Expr->getContext(),
+ makeArrayRef(&*Expr->Elements.begin(),
+ Expr->Elements.size() - PatternSize));
+ }
+ return Expr;
+}
+
DIExpression *DIExpression::prepend(const DIExpression *Expr, bool DerefBefore,
int64_t Offset, bool DerefAfter,
bool StackValue) {
Modified: llvm/trunk/test/DebugInfo/NVPTX/dbg-declare-alloca.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/NVPTX/dbg-declare-alloca.ll?rev=353203&r1=353202&r2=353203&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/NVPTX/dbg-declare-alloca.ll (original)
+++ llvm/trunk/test/DebugInfo/NVPTX/dbg-declare-alloca.ll Tue Feb 5 11:33:47 2019
@@ -68,6 +68,8 @@
; CHECK-NEXT: .b8 3 // Abbreviation Code
; CHECK-NEXT: .b8 52 // DW_TAG_variable
; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
+; CHECK-NEXT: .b8 51 // DW_AT_address_class
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
; CHECK-NEXT: .b8 2 // DW_AT_location
; CHECK-NEXT: .b8 10 // DW_FORM_block1
; CHECK-NEXT: .b8 3 // DW_AT_name
@@ -123,12 +125,12 @@
; CHECK-NEXT: }
; CHECK-NEXT: .section .debug_info
; CHECK-NEXT: {
-; CHECK-NEXT: .b32 135 // Length of Unit
+; CHECK-NEXT: .b32 136 // Length of Unit
; CHECK-NEXT: .b8 2 // DWARF version number
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b32 .debug_abbrev // Offset Into Abbrev. Section
; CHECK-NEXT: .b8 8 // Address Size (in bytes)
-; CHECK-NEXT: .b8 1 // Abbrev [1] 0xb:0x80 DW_TAG_compile_unit
+; CHECK-NEXT: .b8 1 // Abbrev [1] 0xb:0x81 DW_TAG_compile_unit
; CHECK-NEXT: .b8 99,108,97,110,103 // DW_AT_producer
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b8 12 // DW_AT_language
@@ -140,7 +142,7 @@
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
-; CHECK-NEXT: .b8 2 // Abbrev [2] 0x31:0x3d DW_TAG_subprogram
+; CHECK-NEXT: .b8 2 // Abbrev [2] 0x31:0x3e DW_TAG_subprogram
; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
; CHECK-NEXT: .b8 1 // DW_AT_frame_base
@@ -151,7 +153,8 @@
; CHECK-NEXT: .b8 3 // DW_AT_decl_line
; CHECK-NEXT: .b8 1 // DW_AT_prototyped
; CHECK-NEXT: .b8 1 // DW_AT_external
-; CHECK-NEXT: .b8 3 // Abbrev [3] 0x58:0x15 DW_TAG_variable
+; CHECK-NEXT: .b8 3 // Abbrev [3] 0x58:0x16 DW_TAG_variable
+; CHECK-NEXT: .b8 6 // DW_AT_address_class
; CHECK-NEXT: .b8 11 // DW_AT_location
; CHECK-NEXT: .b8 3
; CHECK-NEXT: .b64 __local_depot0
@@ -161,25 +164,25 @@
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
; CHECK-NEXT: .b8 4 // DW_AT_decl_line
-; CHECK-NEXT: .b32 110 // DW_AT_type
+; CHECK-NEXT: .b32 111 // DW_AT_type
; CHECK-NEXT: .b8 0 // End Of Children Mark
-; CHECK-NEXT: .b8 4 // Abbrev [4] 0x6e:0x15 DW_TAG_structure_type
+; CHECK-NEXT: .b8 4 // Abbrev [4] 0x6f:0x15 DW_TAG_structure_type
; CHECK-NEXT: .b8 70,111,111 // DW_AT_name
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b8 4 // DW_AT_byte_size
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
; CHECK-NEXT: .b8 1 // DW_AT_decl_line
-; CHECK-NEXT: .b8 5 // Abbrev [5] 0x76:0xc DW_TAG_member
+; CHECK-NEXT: .b8 5 // Abbrev [5] 0x77:0xc DW_TAG_member
; CHECK-NEXT: .b8 120 // DW_AT_name
; CHECK-NEXT: .b8 0
-; CHECK-NEXT: .b32 131 // DW_AT_type
+; CHECK-NEXT: .b32 132 // DW_AT_type
; CHECK-NEXT: .b8 1 // DW_AT_decl_file
; CHECK-NEXT: .b8 1 // DW_AT_decl_line
; CHECK-NEXT: .b8 2 // DW_AT_data_member_location
; CHECK-NEXT: .b8 35
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b8 0 // End Of Children Mark
-; CHECK-NEXT: .b8 6 // Abbrev [6] 0x83:0x7 DW_TAG_base_type
+; CHECK-NEXT: .b8 6 // Abbrev [6] 0x84:0x7 DW_TAG_base_type
; CHECK-NEXT: .b8 105,110,116 // DW_AT_name
; CHECK-NEXT: .b8 0
; CHECK-NEXT: .b8 5 // DW_AT_encoding
Added: llvm/trunk/test/DebugInfo/NVPTX/debug-addr-class.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/NVPTX/debug-addr-class.ll?rev=353203&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/NVPTX/debug-addr-class.ll (added)
+++ llvm/trunk/test/DebugInfo/NVPTX/debug-addr-class.ll Tue Feb 5 11:33:47 2019
@@ -0,0 +1,255 @@
+; RUN: llc -mtriple=nvptx64-nvidia-cuda < %s | FileCheck %s
+
+ at GLOBAL = addrspace(1) externally_initialized global i32 0, align 4, !dbg !0
+ at SHARED = addrspace(3) externally_initialized global i32 undef, align 4, !dbg !6
+
+define void @test(float, float*, float*, i32) !dbg !17 {
+ %5 = alloca float, align 4
+ %6 = alloca float*, align 8
+ %7 = alloca float*, align 8
+ %8 = alloca i32, align 4
+ store float %0, float* %5, align 4
+ call void @llvm.dbg.declare(metadata float* %5, metadata !22, metadata !DIExpression()), !dbg !23
+ store float* %1, float** %6, align 8
+ call void @llvm.dbg.declare(metadata float** %6, metadata !24, metadata !DIExpression()), !dbg !25
+ store float* %2, float** %7, align 8
+ call void @llvm.dbg.declare(metadata float** %7, metadata !26, metadata !DIExpression()), !dbg !27
+ store i32 %3, i32* %8, align 4
+ call void @llvm.dbg.declare(metadata i32* %8, metadata !28, metadata !DIExpression()), !dbg !29
+ %9 = load float, float* %5, align 4, !dbg !30
+ %10 = load float*, float** %6, align 8, !dbg !31
+ %11 = load i32, i32* %8, align 4, !dbg !32
+ %12 = sext i32 %11 to i64, !dbg !31
+ %13 = getelementptr inbounds float, float* %10, i64 %12, !dbg !31
+ %14 = load float, float* %13, align 4, !dbg !31
+ %15 = fmul contract float %9, %14, !dbg !33
+ %16 = load float*, float** %7, align 8, !dbg !34
+ %17 = load i32, i32* %8, align 4, !dbg !35
+ %18 = sext i32 %17 to i64, !dbg !34
+ %19 = getelementptr inbounds float, float* %16, i64 %18, !dbg !34
+ store float %15, float* %19, align 4, !dbg !36
+ store i32 0, i32* addrspacecast (i32 addrspace(1)* @GLOBAL to i32*), align 4, !dbg !37
+ store i32 0, i32* addrspacecast (i32 addrspace(3)* @SHARED to i32*), align 4, !dbg !38
+ ret void, !dbg !39
+}
+
+; Function Attrs: nounwind readnone speculatable
+declare void @llvm.dbg.declare(metadata, metadata, metadata)
+
+!llvm.dbg.cu = !{!2}
+!nvvm.annotations = !{!10}
+!llvm.module.flags = !{!11, !12, !13, !14, !15}
+!llvm.ident = !{!16}
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "GLOBAL", scope: !2, file: !8, line: 3, type: !9, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !3, producer: "clang version 9.0.0 (trunk 351969) (llvm/trunk 351973)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)
+!3 = !DIFile(filename: "new.cc", directory: "/tmp")
+!4 = !{}
+!5 = !{!0, !6}
+!6 = !DIGlobalVariableExpression(var: !7, expr: !DIExpression(DW_OP_constu, 8, DW_OP_swap, DW_OP_xderef))
+!7 = distinct !DIGlobalVariable(name: "SHARED", scope: !2, file: !8, line: 4, type: !9, isLocal: false, isDefinition: true)
+!8 = !DIFile(filename: "test.cu", directory: "/tmp")
+!9 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!10 = !{void (float, float*, float*, i32)* @test, !"kernel", i32 1}
+!11 = !{i32 2, !"Dwarf Version", i32 2}
+!12 = !{i32 2, !"Debug Info Version", i32 3}
+!13 = !{i32 1, !"wchar_size", i32 4}
+!14 = !{i32 4, !"nvvm-reflect-ftz", i32 0}
+!15 = !{i32 7, !"PIC Level", i32 2}
+!16 = !{!"clang version 9.0.0 (trunk 351969) (llvm/trunk 351973)"}
+!17 = distinct !DISubprogram(name: "test", linkageName: "test", scope: !8, file: !8, line: 6, type: !18, scopeLine: 6, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !4)
+!18 = !DISubroutineType(types: !19)
+!19 = !{null, !20, !21, !21, !9}
+!20 = !DIBasicType(name: "float", size: 32, encoding: DW_ATE_float)
+!21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !20, size: 64)
+!22 = !DILocalVariable(name: "a", arg: 1, scope: !17, file: !8, line: 6, type: !20)
+!23 = !DILocation(line: 6, column: 41, scope: !17)
+!24 = !DILocalVariable(name: "x", arg: 2, scope: !17, file: !8, line: 6, type: !21)
+!25 = !DILocation(line: 6, column: 51, scope: !17)
+!26 = !DILocalVariable(name: "y", arg: 3, scope: !17, file: !8, line: 6, type: !21)
+!27 = !DILocation(line: 6, column: 61, scope: !17)
+!28 = !DILocalVariable(name: "i", arg: 4, scope: !17, file: !8, line: 6, type: !9)
+!29 = !DILocation(line: 6, column: 68, scope: !17)
+!30 = !DILocation(line: 7, column: 10, scope: !17)
+!31 = !DILocation(line: 7, column: 14, scope: !17)
+!32 = !DILocation(line: 7, column: 16, scope: !17)
+!33 = !DILocation(line: 7, column: 12, scope: !17)
+!34 = !DILocation(line: 7, column: 3, scope: !17)
+!35 = !DILocation(line: 7, column: 5, scope: !17)
+!36 = !DILocation(line: 7, column: 8, scope: !17)
+!37 = !DILocation(line: 8, column: 10, scope: !17)
+!38 = !DILocation(line: 9, column: 10, scope: !17)
+!39 = !DILocation(line: 10, column: 1, scope: !17)
+
+; CHECK: .section .debug_abbrev
+; CHECK-NEXT: {
+; CHECK-NEXT: .b8 1 // Abbreviation Code
+; CHECK-NEXT: .b8 17 // DW_TAG_compile_unit
+; CHECK-NEXT: .b8 1 // DW_CHILDREN_yes
+; CHECK-NEXT: .b8 37 // DW_AT_producer
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 19 // DW_AT_language
+; CHECK-NEXT: .b8 5 // DW_FORM_data2
+; CHECK-NEXT: .b8 3 // DW_AT_name
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 16 // DW_AT_stmt_list
+; CHECK-NEXT: .b8 6 // DW_FORM_data4
+; CHECK-NEXT: .b8 27 // DW_AT_comp_dir
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 17 // DW_AT_low_pc
+; CHECK-NEXT: .b8 1 // DW_FORM_addr
+; CHECK-NEXT: .b8 18 // DW_AT_high_pc
+; CHECK-NEXT: .b8 1 // DW_FORM_addr
+; CHECK-NEXT: .b8 0 // EOM(1)
+; CHECK-NEXT: .b8 0 // EOM(2)
+; CHECK-NEXT: .b8 2 // Abbreviation Code
+; CHECK-NEXT: .b8 52 // DW_TAG_variable
+; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
+; CHECK-NEXT: .b8 3 // DW_AT_name
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 73 // DW_AT_type
+; CHECK-NEXT: .b8 19 // DW_FORM_ref4
+; CHECK-NEXT: .b8 63 // DW_AT_external
+; CHECK-NEXT: .b8 12 // DW_FORM_flag
+; CHECK-NEXT: .b8 58 // DW_AT_decl_file
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 59 // DW_AT_decl_line
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 51 // DW_AT_address_class
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 2 // DW_AT_location
+; CHECK-NEXT: .b8 10 // DW_FORM_block1
+; CHECK-NEXT: .b8 0 // EOM(1)
+; CHECK-NEXT: .b8 0 // EOM(2)
+; CHECK-NEXT: .b8 3 // Abbreviation Code
+; CHECK-NEXT: .b8 36 // DW_TAG_base_type
+; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
+; CHECK-NEXT: .b8 3 // DW_AT_name
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 62 // DW_AT_encoding
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 11 // DW_AT_byte_size
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 0 // EOM(1)
+; CHECK-NEXT: .b8 0 // EOM(2)
+; CHECK-NEXT: .b8 4 // Abbreviation Code
+; CHECK-NEXT: .b8 46 // DW_TAG_subprogram
+; CHECK-NEXT: .b8 1 // DW_CHILDREN_yes
+; CHECK-NEXT: .b8 17 // DW_AT_low_pc
+; CHECK-NEXT: .b8 1 // DW_FORM_addr
+; CHECK-NEXT: .b8 18 // DW_AT_high_pc
+; CHECK-NEXT: .b8 1 // DW_FORM_addr
+; CHECK-NEXT: .b8 64 // DW_AT_frame_base
+; CHECK-NEXT: .b8 10 // DW_FORM_block1
+; CHECK-NEXT: .b8 135,64 // DW_AT_MIPS_linkage_name
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 3 // DW_AT_name
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 58 // DW_AT_decl_file
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 59 // DW_AT_decl_line
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 63 // DW_AT_external
+; CHECK-NEXT: .b8 12 // DW_FORM_flag
+; CHECK-NEXT: .b8 0 // EOM(1)
+; CHECK-NEXT: .b8 0 // EOM(2)
+; CHECK-NEXT: .b8 5 // Abbreviation Code
+; CHECK-NEXT: .b8 5 // DW_TAG_formal_parameter
+; CHECK-NEXT: .b8 0 // DW_CHILDREN_no
+; CHECK-NEXT: .b8 3 // DW_AT_name
+; CHECK-NEXT: .b8 8 // DW_FORM_string
+; CHECK-NEXT: .b8 58 // DW_AT_decl_file
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 59 // DW_AT_decl_line
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 73 // DW_AT_type
+; CHECK-NEXT: .b8 19 // DW_FORM_ref4
+; CHECK-NEXT: .b8 0 // EOM(1)
+; CHECK-NEXT: .b8 0 // EOM(2)
+; CHECK-NEXT: .b8 0 // EOM(3)
+; CHECK-NEXT: }
+; CHECK-NEXT: .section .debug_info
+; CHECK-NEXT: {
+; CHECK-NEXT: .b32 217 // Length of Unit
+; CHECK-NEXT: .b8 2 // DWARF version number
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b32 .debug_abbrev // Offset Into Abbrev. Section
+; CHECK-NEXT: .b8 8 // Address Size (in bytes)
+; CHECK-NEXT: .b8 1 // Abbrev [1] 0xb:0xd2 DW_TAG_compile_unit
+; CHECK-NEXT: .b8 99,108,97,110,103,32,118,101,114,115,105,111,110,32,57,46,48,46,48,32,40,116,114,117,110,107,32,51,53,49,57,54,57,41,32,40,108,108,118,109 // DW_AT_producer
+; CHECK-NEXT: .b8 47,116,114,117,110,107,32,51,53,49,57,55,51,41
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 4 // DW_AT_language
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 110,101,119,46,99,99 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b32 .debug_line // DW_AT_stmt_list
+; CHECK-NEXT: .b8 47,116,109,112 // DW_AT_comp_dir
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
+; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
+; CHECK-NEXT: .b8 2 // Abbrev [2] 0x65:0x1a DW_TAG_variable
+; CHECK-NEXT: .b8 71,76,79,66,65,76 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b32 127 // DW_AT_type
+; CHECK-NEXT: .b8 1 // DW_AT_external
+; CHECK-NEXT: .b8 1 // DW_AT_decl_file
+; CHECK-NEXT: .b8 3 // DW_AT_decl_line
+; CHECK-NEXT: .b8 5 // DW_AT_address_class
+; CHECK-NEXT: .b8 9 // DW_AT_location
+; CHECK-NEXT: .b8 3
+; CHECK-NEXT: .b64 GLOBAL
+; CHECK-NEXT: .b8 3 // Abbrev [3] 0x7f:0x7 DW_TAG_base_type
+; CHECK-NEXT: .b8 105,110,116 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 5 // DW_AT_encoding
+; CHECK-NEXT: .b8 4 // DW_AT_byte_size
+; CHECK-NEXT: .b8 2 // Abbrev [2] 0x86:0x1a DW_TAG_variable
+; CHECK-NEXT: .b8 83,72,65,82,69,68 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b32 127 // DW_AT_type
+; CHECK-NEXT: .b8 1 // DW_AT_external
+; CHECK-NEXT: .b8 1 // DW_AT_decl_file
+; CHECK-NEXT: .b8 4 // DW_AT_decl_line
+; CHECK-NEXT: .b8 8 // DW_AT_address_class
+; CHECK-NEXT: .b8 9 // DW_AT_location
+; CHECK-NEXT: .b8 3
+; CHECK-NEXT: .b64 SHARED
+; CHECK-NEXT: .b8 4 // Abbrev [4] 0xa0:0x33 DW_TAG_subprogram
+; CHECK-NEXT: .b64 Lfunc_begin0 // DW_AT_low_pc
+; CHECK-NEXT: .b64 Lfunc_end0 // DW_AT_high_pc
+; CHECK-NEXT: .b8 1 // DW_AT_frame_base
+; CHECK-NEXT: .b8 156
+; CHECK-NEXT: .b8 116,101,115,116 // DW_AT_MIPS_linkage_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 116,101,115,116 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 1 // DW_AT_decl_file
+; CHECK-NEXT: .b8 6 // DW_AT_decl_line
+; CHECK-NEXT: .b8 1 // DW_AT_external
+; CHECK-NEXT: .b8 5 // Abbrev [5] 0xc0:0x9 DW_TAG_formal_parameter
+; CHECK-NEXT: .b8 97 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 1 // DW_AT_decl_file
+; CHECK-NEXT: .b8 6 // DW_AT_decl_line
+; CHECK-NEXT: .b32 211 // DW_AT_type
+; CHECK-NEXT: .b8 5 // Abbrev [5] 0xc9:0x9 DW_TAG_formal_parameter
+; CHECK-NEXT: .b8 105 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 1 // DW_AT_decl_file
+; CHECK-NEXT: .b8 6 // DW_AT_decl_line
+; CHECK-NEXT: .b32 127 // DW_AT_type
+; CHECK-NEXT: .b8 0 // End Of Children Mark
+; CHECK-NEXT: .b8 3 // Abbrev [3] 0xd3:0x9 DW_TAG_base_type
+; CHECK-NEXT: .b8 102,108,111,97,116 // DW_AT_name
+; CHECK-NEXT: .b8 0
+; CHECK-NEXT: .b8 4 // DW_AT_encoding
+; CHECK-NEXT: .b8 4 // DW_AT_byte_size
+; CHECK-NEXT: .b8 0 // End Of Children Mark
+; CHECK-NEXT: }
+; CHECK-NEXT: .section .debug_macinfo
+; CHECK-NEXT: {
+; CHECK-NEXT: .b8 0 // End Of Macro List Mark
+; CHECK: }
+
More information about the llvm-commits
mailing list