This is an archive of the discontinued LLVM Phabricator instance.

Emit DW_RLE_base_addressx + DW_RLE_offset_pairs instead of DW_ELE_start_length in debug_rnglists section
ClosedPublic

Authored by rastogishubham on Jul 24 2023, 1:42 PM.

Details

Summary

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

Diff Detail

Event Timeline

rastogishubham created this revision.Jul 24 2023, 1:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 1:42 PM
rastogishubham requested review of this revision.Jul 24 2023, 1:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2023, 1:42 PM
aprantl added inline comments.Jul 24 2023, 3:36 PM
llvm/lib/DWARFLinker/DWARFStreamer.cpp
508–509

This comment sounds wrong. What is being emitted here?

avl accepted this revision.Jul 25 2023, 5:44 AM

LGTM , assuming Adrian comment is addressed.

This revision is now accepted and ready to land.Jul 25 2023, 5:44 AM
rastogishubham marked an inline comment as done.

Fixed comment for end offset

aprantl accepted this revision.Jul 25 2023, 1:11 PM
This revision was landed with ongoing or failed builds.Jul 25 2023, 4:18 PM
This revision was automatically updated to reflect the committed changes.