[PATCH] D54242: DebugInfo: Add a CU metadata attribute for use of DWARF ranges base address specifiers

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 17:06:43 PST 2018


dblaikie created this revision.
dblaikie added reviewers: aprantl, JDevlieghere, probinson.
Herald added a subscriber: llvm-commits.

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.

I'm open to suggestions on naming - I suppose having "debug" in the name of the metadata attribute is a bit redundant - of course it's debug related when it's there. How fully qualified should the name be? "useRangesBaseAddressSpecifiers" is a bit of a mouthful. "rangesBaseAddresses: true" ? or just "baseAddress: true" baseAddresses?


Repository:
  rL LLVM

https://reviews.llvm.org/D54242

Files:
  include/llvm/IR/DIBuilder.h
  include/llvm/IR/DebugInfoMetadata.h
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/MetadataLoader.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/IR/DIBuilder.cpp
  lib/IR/DebugInfo.cpp
  lib/IR/DebugInfoMetadata.cpp
  test/DebugInfo/X86/range_reloc.ll
  unittests/IR/MetadataTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54242.173093.patch
Type: text/x-patch
Size: 25904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181108/dfc55ca9/attachment.bin>


More information about the llvm-commits mailing list