[all-commits] [llvm/llvm-project] a43137: [LLVM][DWARF] Make some effort to avoid duplicates...

Kyle Huey via All-commits all-commits at lists.llvm.org
Wed Sep 4 11:46:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a43137c3f85fd87f90c9a8ffaebd71d432018e79
      https://github.com/llvm/llvm-project/commit/a43137c3f85fd87f90c9a8ffaebd71d432018e79
  Author: Kyle Huey <khuey at kylehuey.com>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp
    M llvm/lib/CodeGen/AsmPrinter/DwarfFile.h
    A llvm/test/DebugInfo/Generic/debug-ranges-duplication.ll

  Log Message:
  -----------
  [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%.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list