diff options
author | David Blaikie <dblaikie@gmail.com> | 2018-11-13 20:08:10 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2018-11-13 20:08:10 +0000 |
commit | bb279116f29617467a176f065c8ca4e84174e7f7 (patch) | |
tree | 5faf1969b2e9d4b43ddf8b30d5abd0ee08760897 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 2af3416618e6d521eade365eecf5ab353cdf5b6c (diff) | |
download | bcm5719-llvm-bb279116f29617467a176f065c8ca4e84174e7f7.tar.gz bcm5719-llvm-bb279116f29617467a176f065c8ca4e84174e7f7.zip |
DebugInfo: Add a CU metadata attribute for use of DWARF ranges base address specifiers
Summary:
Ranges base address specifiers can save a lot of object size in
relocation records especially in optimized builds.
For an optimized self-host build of Clang with split DWARF and debug
info compression in object files, but uncompressed debug info in the
executable, this change produces about 18% smaller object files and 6%
larger executable.
While it would've been nice to turn this on by default, gold's 32 bit
gdb-index support crashes on this input & I don't think there's any
perfect heuristic to implement solely in LLVM that would suffice - so
we'll need a flag one way or another (also possible people might want to
aggressively optimized for executable size that contains debug info
(even with compression this would still come at some cost to executable
size)) - so let's plumb it through.
Differential Revision: https://reviews.llvm.org/D54242
llvm-svn: 346788
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 7f555a52fcf..9c0480fa745 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2287,7 +2287,7 @@ static void emitRangeList(DwarfDebug &DD, AsmPrinter *Asm, // contributions. auto *Base = CUBase; if (!Base && (P.second.size() > 1 || DwarfVersion < 5) && - (UseDwarfRangesBaseAddressSpecifier || DwarfVersion >= 5)) { + (CU.getCUNode()->getRangesBaseAddress() || DwarfVersion >= 5)) { BaseIsSet = true; // FIXME/use care: This may not be a useful base address if it's not // the lowest address/range in this object. |