[llvm] r216521 - Remove type unit skeletons. GDB no longer needs them & this saves a heap of space.
Eric Christopher
echristo at gmail.com
Tue Sep 9 15:35:50 PDT 2014
Yay!
-eric
On Tue, Aug 26, 2014 at 10:04 PM, David Blaikie <dblaikie at gmail.com> wrote:
> Author: dblaikie
> Date: Wed Aug 27 00:04:14 2014
> New Revision: 216521
>
> URL: http://llvm.org/viewvc/llvm-project?rev=216521&view=rev
> Log:
> Remove type unit skeletons. GDB no longer needs them & this saves a heap
> of space.
>
> Modified:
> llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
>
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=216521&r1=216520&r2=216521&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Aug 27 00:04:14
> 2014
> @@ -2481,24 +2481,6 @@ DwarfCompileUnit &DwarfDebug::constructS
> return NewCU;
> }
>
> -// This DIE has the following attributes: DW_AT_comp_dir, DW_AT_dwo_name,
> -// DW_AT_addr_base.
> -DwarfTypeUnit &DwarfDebug::constructSkeletonTU(DwarfTypeUnit &TU) {
> - DwarfCompileUnit &CU = static_cast<DwarfCompileUnit &>(
> - *SkeletonHolder.getUnits()[TU.getCU().getUniqueID()]);
> -
> - auto OwnedUnit = make_unique<DwarfTypeUnit>(TU.getUniqueID(), CU, Asm,
> this,
> - &SkeletonHolder);
> - DwarfTypeUnit &NewTU = *OwnedUnit;
> - NewTU.setTypeSignature(TU.getTypeSignature());
> - NewTU.setType(nullptr);
> - NewTU.initSection(
> -
> Asm->getObjFileLowering().getDwarfTypesSection(TU.getTypeSignature()));
> -
> - initSkeletonUnit(TU, NewTU.getUnitDie(), std::move(OwnedUnit));
> - return NewTU;
> -}
> -
> // Emit the .debug_info.dwo section for separated dwarf. This contains the
> // compile units that would normally be in debug_info.
> void DwarfDebug::emitDebugInfoDWO() {
> @@ -2621,11 +2603,8 @@ void DwarfDebug::addDwarfTypeUnitType(Dw
>
> // If the type wasn't dependent on fission addresses, finish adding
> the type
> // and all its dependent types.
> - for (auto &TU : TypeUnitsToAdd) {
> - if (useSplitDwarf())
> - TU.first->setSkeleton(constructSkeletonTU(*TU.first));
> + for (auto &TU : TypeUnitsToAdd)
> InfoHolder.addUnit(std::move(TU.first));
> - }
> }
> CU.addDIETypeSignature(RefDie, NewTU);
> }
>
> Modified: llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll?rev=216521&r1=216520&r2=216521&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll Wed Aug 27 00:04:14
> 2014
> @@ -2,11 +2,11 @@
>
> ; RUN: llc < %s -o %t -filetype=obj -O0 -generate-type-units
> -mtriple=x86_64-unknown-linux-gnu
> ; RUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK
> --check-prefix=SINGLE %s
> -; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_COMMON %s
> +; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_SINGLE %s
>
> ; RUN: llc < %s -split-dwarf=Enable -o %t -filetype=obj -O0
> -generate-type-units -mtriple=x86_64-unknown-linux-gnu
> ; RUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK
> --check-prefix=FISSION %s
> -; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_COMMON
> --check-prefix=OBJ_FISSION %s
> +; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_FISSION %s
>
> ; Generated from bar.cpp:
>
> @@ -74,20 +74,8 @@
> ; CHECK-NEXT: DW_AT_declaration
> ; CHECK-NEXT: DW_AT_signature {{.*}} (0xfd756cee88f8a118)
>
> -; FISSION-LABEL: .debug_types contents:
> -; FISSION-NOT: type_signature
> -; FISSION-LABEL: type_signature = 0x1d02f3be30cc5688
> -; FISSION: DW_TAG_type_unit
> -; FISSION-NEXT: DW_AT_GNU_dwo_name{{.*}}"bar.dwo"
> -; FISSION-NEXT: DW_AT_comp_dir{{.*}}"/tmp/dbginfo"
> -; FISSION-NOT: type_signature
> -; FISSION-LABEL: type_signature = 0xb04af47397402e77
> -; FISSION-NOT: type_signature
> -; FISSION-LABEL: type_signature = 0xfd756cee88f8a118
> -; FISSION-NOT: type_signature
> -; FISSION-LABEL: type_signature = 0xe94f6d3843e62d6b
> -
> ; SINGLE-LABEL: .debug_types contents:
> +; FISSION-NOT: .debug_types contents:
> ; FISSION-LABEL: .debug_types.dwo contents:
>
> ; Check that we generate a hash for bar and the value.
> @@ -166,9 +154,9 @@
> ; Make sure debug_types are in comdat groups. This could be more rigid to
> check
> ; that they're the right comdat groups (each type in a separate comdat
> group,
> ; etc)
> -; OBJ_COMMON: Name: .debug_types (
> -; OBJ_COMMON-NOT: }
> -; OBJ_COMMON: SHF_GROUP
> +; OBJ_SINGLE: Name: .debug_types (
> +; OBJ_SINGLE-NOT: }
> +; OBJ_SINGLE: SHF_GROUP
>
> ; Fission type units don't go in comdat groups, since their linker is
> debug
> ; aware it's handled using the debug info semantics rather than raw ELF
> object
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140909/d576ffee/attachment.html>
More information about the llvm-commits
mailing list