Bug 27480

Summary: Consider .debug_loclists optimizations
Product: dwz Reporter: Jakub Jelinek <jakub>
Component: defaultAssignee: Nobody <nobody>
Status: NEW ---    
Severity: enhancement CC: dwz, vries
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Jakub Jelinek 2021-02-27 10:45:45 UTC
As mentioned in https://gcc.gnu.org/pipermail/gcc-patches/2021-February/565965.html
GCC for non-partitioned TUs emits DW_LLE_offset_pair which will be likely a win for small TUs, but might be too large for very large TUs - both operands are offsets from base, so say 256KB TU would near the end of the .text section have
3 bytes for each of the operands, and for 2MB TU even 4 bytes for each operand.
Compared to one DW_LLE_base_address with 4 (or 8) byte operand and then DW_LLE_offset_pair with likely just 1 byte operands.
Similarly, for partitioned TUs, we emit DW_LLE_start_end or DW_LLE_base_address + DW_LLE_offset_pair, but maybe DW_LLE_offset_pair would be smaller.