Files
clang-p2996/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
Kyle Huey a43137c3f8 [LLVM][DWARF] Make some effort to avoid duplicates in .debug_ranges. (#106614)
Inlining and zero-cost abstractions tend to produce volumes of debug
info with identical ranges. When built with full debugging information
(the equivalent of -g2) librustc_driver.so has 2.1 million entries in
.debug_ranges. But only 1.1 million of those entries are unique. While
in principle all duplicates could be eliminated with a hashtable,
checking to see if the new range is exactly identical to the previous
range and skipping a new addition if it is is sufficient to eliminate
99.99% of the duplicates. This reduces the size of librustc_driver.so's
.debug_ranges section by 35%, or the overall binary size a little more
than 1%.
2024-09-04 11:46:01 -07:00

4.6 KiB