[llvm] r203082 - DebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
David Blaikie
dblaikie at gmail.com
Wed Mar 5 21:47:39 PST 2014
Author: dblaikie
Date: Wed Mar 5 23:47:39 2014
New Revision: 203082
URL: http://llvm.org/viewvc/llvm-project?rev=203082&view=rev
Log:
DebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
This is consistent with GDB ToT and reduces the number of relocations in
(type and compile) units, substantially reducing relocations and debug
size in fission + type units builds.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/test/DebugInfo/X86/gnu-public-names-empty.ll
llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=203082&r1=203081&r2=203082&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Mar 5 23:47:39 2014
@@ -733,13 +733,7 @@ void DwarfDebug::addGnuPubAttributes(Dwa
if (!GenerateGnuPubSections)
return;
- addSectionLabel(Asm, U, D, dwarf::DW_AT_GNU_pubnames,
- Asm->GetTempSymbol("gnu_pubnames", U->getUniqueID()),
- DwarfGnuPubNamesSectionSym);
-
- addSectionLabel(Asm, U, D, dwarf::DW_AT_GNU_pubtypes,
- Asm->GetTempSymbol("gnu_pubtypes", U->getUniqueID()),
- DwarfGnuPubTypesSectionSym);
+ U->addFlag(D, dwarf::DW_AT_GNU_pubnames);
}
// Create new DwarfCompileUnit for the given metadata node with tag
Modified: llvm/trunk/test/DebugInfo/X86/gnu-public-names-empty.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/gnu-public-names-empty.ll?rev=203082&r1=203081&r2=203082&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/gnu-public-names-empty.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/gnu-public-names-empty.ll Wed Mar 5 23:47:39 2014
@@ -6,8 +6,8 @@
; Check that the attributes in the compile unit both point to a correct
; location, even when nothing is exported.
-; CHECK: DW_AT_GNU_pubnames [DW_FORM_sec_offset] (0x00000000)
-; CHECK: DW_AT_GNU_pubtypes [DW_FORM_sec_offset] (0x00000000)
+; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true)
+; CHECK-NOT: DW_AT_GNU_pubtypes [
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!3, !4}
Modified: llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll?rev=203082&r1=203081&r2=203082&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/gnu-public-names.ll Wed Mar 5 23:47:39 2014
@@ -47,8 +47,8 @@
; CHECK: .debug_info contents:
; CHECK: Compile Unit: length = [[UNIT_SIZE:[0-9a-f]+]]
-; CHECK: DW_AT_GNU_pubnames [DW_FORM_sec_offset] (0x00000000)
-; CHECK: DW_AT_GNU_pubtypes [DW_FORM_sec_offset] (0x00000000)
+; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true)
+; CHECK-NOT: DW_AT_GNU_pubtypes [
; CHECK: [[C:[0-9a-f]+]]: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name {{.*}} "C"
@@ -127,8 +127,8 @@
; DWARF3: .debug_info contents:
; DWARF3: Compile Unit: length = [[UNIT_SIZE:[0-9a-f]+]]
-; DWARF3: DW_AT_GNU_pubnames [DW_FORM_data4] (0x00000000)
-; DWARF3: DW_AT_GNU_pubtypes [DW_FORM_data4] (0x00000000)
+; DWARF3: DW_AT_GNU_pubnames [DW_FORM_flag] (0x01)
+; DWARF3-NOT: DW_AT_GNU_pubtypes [
; DWARF3: [[C:[0-9a-f]+]]: DW_TAG_structure_type
; DWARF3-NEXT: DW_AT_name {{.*}} "C"
More information about the llvm-commits
mailing list