[PATCH] D153080: Emit DW_LLE_base_address + DW_LLE_offset_pairs instead of DW_LLE_start_length in debug_loclists section
Shubham Sandeep Rastogi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 15 15:28:12 PDT 2023
rastogishubham created this revision.
rastogishubham added reviewers: aprantl, JDevlieghere, avl.
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_loclist section by replacing the DW_LLE_start_length opcodes currently emitted by dsymutil in favor of using DW_LLE_base_address + DW_LLE_offset_pair instead.
The DW_LLE_start_length is one AddressSize followed by a ULEB per entry, whereas, the DW_LLE_base_address + DW_LLE_offset_pair will use one AddressSize for the base address, and then the DW_LLE_offset_pair is a pair of ULEBs. This will be more efficient where a loclist fragment has many entries.
I tried to see the size of the clang.dSYM and it went from 12.23 MB to 10.46 MB in size.
https://reviews.llvm.org/D153080
Files:
llvm/include/llvm/DWARFLinker/DWARFLinker.h
llvm/include/llvm/DWARFLinker/DWARFStreamer.h
llvm/include/llvm/DebugInfo/DWARF/DWARFLocationExpression.h
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/lib/DWARFLinker/DWARFStreamer.cpp
llvm/lib/DWARFLinkerParallel/DWARFEmitterImpl.h
llvm/test/tools/dsymutil/ARM/dwarf5-dwarf4-combination-macho.test
llvm/test/tools/dsymutil/ARM/dwarf5-macho.test
llvm/test/tools/dsymutil/X86/dwarf5-loclists.test
llvm/test/tools/llvm-dwarfutil/ELF/X86/dwarf5-loclists.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153080.531918.patch
Type: text/x-patch
Size: 22541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230615/dd1d1697/attachment.bin>
More information about the llvm-commits
mailing list