[llvm] r365945 - [DebugInfo] Add column info for inline sites
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 12 12:25:45 PDT 2019
Author: jdevlieghere
Date: Fri Jul 12 12:25:45 2019
New Revision: 365945
URL: http://llvm.org/viewvc/llvm-project?rev=365945&view=rev
Log:
[DebugInfo] Add column info for inline sites
The column field is missing for all inline sites, currently it's always
zero. This changes populates DW_AT_call_column field for inline sites.
Test case modified to cover this change.
Patch by: Wenlei He
Differential revision: https://reviews.llvm.org/D64033
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/test/DebugInfo/Inputs/gmlt.ll
llvm/trunk/test/DebugInfo/NVPTX/debug-info.ll
llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
llvm/trunk/test/DebugInfo/X86/fission-inline.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=365945&r1=365944&r2=365945&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Jul 12 12:25:45 2019
@@ -543,6 +543,7 @@ DIE *DwarfCompileUnit::constructInlinedS
addUInt(*ScopeDIE, dwarf::DW_AT_call_file, None,
getOrCreateSourceID(IA->getFile()));
addUInt(*ScopeDIE, dwarf::DW_AT_call_line, None, IA->getLine());
+ addUInt(*ScopeDIE, dwarf::DW_AT_call_column, None, IA->getColumn());
if (IA->getDiscriminator() && DD->getDwarfVersion() >= 4)
addUInt(*ScopeDIE, dwarf::DW_AT_GNU_discriminator, None,
IA->getDiscriminator());
Modified: llvm/trunk/test/DebugInfo/Inputs/gmlt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/gmlt.ll?rev=365945&r1=365944&r2=365945&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Inputs/gmlt.ll (original)
+++ llvm/trunk/test/DebugInfo/Inputs/gmlt.ll Fri Jul 12 12:25:45 2019
@@ -67,6 +67,7 @@
; CHECK-NEXT: DW_AT_high_pc
; CHECK-NEXT: DW_AT_call_file
; CHECK-NEXT: DW_AT_call_line
+; CHECK-NEXT: DW_AT_call_column
; Make sure we don't have any other subprograms here (subprograms with no
; inlined subroutines are omitted by design to save space)
Modified: llvm/trunk/test/DebugInfo/NVPTX/debug-info.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/NVPTX/debug-info.ll?rev=365945&r1=365944&r2=365945&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/NVPTX/debug-info.ll (original)
+++ llvm/trunk/test/DebugInfo/NVPTX/debug-info.ll Fri Jul 12 12:25:45 2019
@@ -670,6 +670,8 @@ if.end:
; CHECK-NEXT: .b8 11 // DW_FORM_data1
; CHECK-NEXT: .b8 89 // DW_AT_call_line
; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 87 // DW_AT_call_column
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
; CHECK-NEXT: .b8 0 // EOM(1)
; CHECK-NEXT: .b8 0 // EOM(2)
; CHECK-NEXT: .b8 43 // Abbreviation Code
@@ -685,6 +687,8 @@ if.end:
; CHECK-NEXT: .b8 11 // DW_FORM_data1
; CHECK-NEXT: .b8 89 // DW_AT_call_line
; CHECK-NEXT: .b8 11 // DW_FORM_data1
+; CHECK-NEXT: .b8 87 // DW_AT_call_column
+; CHECK-NEXT: .b8 11 // DW_FORM_data1
; CHECK-NEXT: .b8 0 // EOM(1)
; CHECK-NEXT: .b8 0 // EOM(2)
; CHECK-NEXT: .b8 44 // Abbreviation Code
@@ -698,12 +702,12 @@ if.end:
; CHECK-NEXT: }
; CHECK-NEXT: .section .debug_info
; CHECK-NEXT: {
-; CHECK-NEXT: .b32 10030 // Length of Unit
+; CHECK-NEXT: .b32 10034 // 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:0x2727 DW_TAG_compile_unit
+; CHECK-NEXT: .b8 1 // Abbrev [1] 0xb:0x272b DW_TAG_compile_unit
; CHECK-NEXT: .b8 0 // DW_AT_producer
; CHECK-NEXT: .b8 4 // DW_AT_language
; CHECK-NEXT: .b8 0
@@ -8302,7 +8306,7 @@ if.end:
; CHECK-NEXT: .b8 3 // DW_AT_decl_line
; CHECK-NEXT: .b32 3345 // DW_AT_type
; CHECK-NEXT: .b8 0 // End Of Children Mark
-; CHECK-NEXT: .b8 40 // Abbrev [40] 0x2671:0xc0 DW_TAG_subprogram
+; CHECK-NEXT: .b8 40 // Abbrev [40] 0x2671:0xc4 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
@@ -8361,33 +8365,37 @@ if.end:
; CHECK-NEXT: .b8 12 // DW_AT_decl_file
; CHECK-NEXT: .b8 6 // DW_AT_decl_line
; CHECK-NEXT: .b32 2332 // DW_AT_type
-; CHECK-NEXT: .b8 42 // Abbrev [42] 0x26c9:0x17 DW_TAG_inlined_subroutine
+; CHECK-NEXT: .b8 42 // Abbrev [42] 0x26c9:0x18 DW_TAG_inlined_subroutine
; CHECK-NEXT: .b32 8432 // DW_AT_abstract_origin
; CHECK-NEXT: .b64 Ltmp0 // DW_AT_low_pc
; CHECK-NEXT: .b64 Ltmp1 // DW_AT_high_pc
; CHECK-NEXT: .b8 12 // DW_AT_call_file
; CHECK-NEXT: .b8 6 // DW_AT_call_line
-; CHECK-NEXT: .b8 42 // Abbrev [42] 0x26e0:0x17 DW_TAG_inlined_subroutine
+; CHECK-NEXT: .b8 11 // DW_AT_call_column
+; CHECK-NEXT: .b8 42 // Abbrev [42] 0x26e1:0x18 DW_TAG_inlined_subroutine
; CHECK-NEXT: .b32 9191 // DW_AT_abstract_origin
; CHECK-NEXT: .b64 Ltmp1 // DW_AT_low_pc
; CHECK-NEXT: .b64 Ltmp2 // DW_AT_high_pc
; CHECK-NEXT: .b8 12 // DW_AT_call_file
; CHECK-NEXT: .b8 6 // DW_AT_call_line
-; CHECK-NEXT: .b8 42 // Abbrev [42] 0x26f7:0x17 DW_TAG_inlined_subroutine
+; CHECK-NEXT: .b8 24 // DW_AT_call_column
+; CHECK-NEXT: .b8 42 // Abbrev [42] 0x26f9:0x18 DW_TAG_inlined_subroutine
; CHECK-NEXT: .b32 9785 // DW_AT_abstract_origin
; CHECK-NEXT: .b64 Ltmp2 // DW_AT_low_pc
; CHECK-NEXT: .b64 Ltmp3 // DW_AT_high_pc
; CHECK-NEXT: .b8 12 // DW_AT_call_file
; CHECK-NEXT: .b8 6 // DW_AT_call_line
-; CHECK-NEXT: .b8 43 // Abbrev [43] 0x270e:0x22 DW_TAG_inlined_subroutine
+; CHECK-NEXT: .b8 37 // DW_AT_call_column
+; CHECK-NEXT: .b8 43 // Abbrev [43] 0x2711:0x23 DW_TAG_inlined_subroutine
; CHECK-NEXT: .b32 9791 // DW_AT_abstract_origin
; CHECK-NEXT: .b64 Ltmp10 // DW_AT_low_pc
; CHECK-NEXT: .b64 Ltmp11 // DW_AT_high_pc
; CHECK-NEXT: .b8 12 // DW_AT_call_file
; CHECK-NEXT: .b8 8 // DW_AT_call_line
-; CHECK-NEXT: .b8 44 // Abbrev [44] 0x2725:0x5 DW_TAG_formal_parameter
+; CHECK-NEXT: .b8 5 // DW_AT_call_column
+; CHECK-NEXT: .b8 44 // Abbrev [44] 0x2729:0x5 DW_TAG_formal_parameter
; CHECK-NEXT: .b32 9811 // DW_AT_abstract_origin
-; CHECK-NEXT: .b8 44 // Abbrev [44] 0x272a:0x5 DW_TAG_formal_parameter
+; CHECK-NEXT: .b8 44 // Abbrev [44] 0x272e:0x5 DW_TAG_formal_parameter
; CHECK-NEXT: .b32 9820 // DW_AT_abstract_origin
; CHECK-NEXT: .b8 0 // End Of Children Mark
; CHECK-NEXT: .b8 0 // End Of Children Mark
Modified: llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll?rev=365945&r1=365944&r2=365945&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dbg-value-inlined-parameter.ll Fri Jul 12 12:25:45 2019
@@ -30,6 +30,7 @@
;CHECK-NEXT: DW_AT_high_pc [DW_FORM_data4]
;CHECK-NEXT: DW_AT_call_file
;CHECK-NEXT: DW_AT_call_line
+;CHECK-NEXT: DW_AT_call_column
;CHECK: DW_TAG_formal_parameter
;CHECK-NOT: DW_TAG
Modified: llvm/trunk/test/DebugInfo/X86/fission-inline.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-inline.ll?rev=365945&r1=365944&r2=365945&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-inline.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-inline.ll Fri Jul 12 12:25:45 2019
@@ -70,6 +70,7 @@
; CHECK-NOT: {{DW_AT|DW_TAG|NULL}}
; CHECK: DW_AT_call_file
; CHECK-NEXT: DW_AT_call_line {{.*}} (18)
+; CHECK-NEXT: DW_AT_call_column {{.*}} (0x05)
; CHECK-NOT: DW_
; CHECK: .debug_info.dwo contents:
More information about the llvm-commits
mailing list