[PATCH] D156166: Emit DW_RLE_base_addressx + DW_RLE_offset_pairs instead of DW_ELE_start_length in debug_rnglists section

Shubham Sandeep Rastogi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 13:42:21 PDT 2023


rastogishubham created this revision.
rastogishubham added reviewers: avl, aprantl, JDevlieghere.
rastogishubham added a project: debug-info.
Herald added subscribers: hiraditya, emaste.
Herald added a project: All.
rastogishubham requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

This patch tries to reduce the size of the debug_rnglist section by replacing the DW_RLE_start_length opcodes currently emitted by dsymutil in favor of using DW_RLE_base_addressx + DW_RLE_offset_pair instead.

The DW_RLE_start_length is one AddressSize followed by a ULEB per entry, whereas, the DW_RLE_base_addressx + DW_RLE_offset_pair will use one ULEB for the base address, and then the DW_RLE_offset_pair is a pair of ULEBs. This will be more efficient.

The size of the debug_rnglist section + debug_addr section in the clang.dSYM went from 12.22 MB to 12.08 MB in size


https://reviews.llvm.org/D156166

Files:
  llvm/include/llvm/DWARFLinker/DWARFLinker.h
  llvm/include/llvm/DWARFLinker/DWARFStreamer.h
  llvm/lib/DWARFLinker/DWARFLinker.cpp
  llvm/lib/DWARFLinker/DWARFStreamer.cpp
  llvm/test/tools/dsymutil/ARM/dwarf5-dwarf4-combination-macho.test
  llvm/test/tools/dsymutil/ARM/dwarf5-macho.test
  llvm/test/tools/dsymutil/X86/dwarf5-rnglists.test
  llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-rnglists.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156166.543680.patch
Type: text/x-patch
Size: 13747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230724/81ad3d53/attachment.bin>


More information about the llvm-commits mailing list