Provide gmlt-like inline scope information in the skeleton CU to facilitate symbolica...
authorDavid Blaikie <dblaikie@gmail.com>
Tue, 4 Nov 2014 22:12:25 +0000 (22:12 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Tue, 4 Nov 2014 22:12:25 +0000 (22:12 +0000)
commitf49ead70985c52e9155c9677e22c5d055d5ab485
tree68147242f3ad0c7d6b5c6bdf31d6608cb8358424
parent41ebc263a98a8ba1e0f2f644d8204b5ffd1cbfa6
Provide gmlt-like inline scope information in the skeleton CU to facilitate symbolication without needing the .dwo files

Clang -gsplit-dwarf self-host -O0, binary increases by 0.0005%, -O2,
binary increases by 25%.

A large binary inside Google, split-dwarf, -O0, and other internal flags
(GDB index, etc) increases by 1.8%, optimized build is 35%.

The size impact may be somewhat greater in .o files (I haven't measured
that much - since the linked executable -O0 numbers seemed low enough)
due to relocations. These relocations could be removed if we taught the
llvm-symbolizer to handle indexed addressing in the .o file (GDB can't
cope with this just yet, but GDB won't be reading this info anyway).
Also debug_ranges could be shared between .o and .dwo, though ideally
debug_ranges would get a schema that could used index(+offset)
addressing, and move to the .dwo file, then we'd be back to sharing
addresses in the address pool again.

But for now, these sizes seem small enough to go ahead with this.

Verified that no other DW_TAGs are produced into the .o file other than
subprograms and inlined_subroutines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221306 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.h
test/DebugInfo/X86/fission-inline.ll [new file with mode: 0644]
test/DebugInfo/X86/generate-odr-hash.ll