[all-commits] [llvm/llvm-project] d3ac9b: [RFC][BOLT] Add a new parallel DWARF processing(2/...

Thrrreeee via All-commits all-commits at lists.llvm.org
Wed Jun 17 20:01:12 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3ac9b5c4cab4ced92f7027ee214d54a04387e78
      https://github.com/llvm/llvm-project/commit/d3ac9b5c4cab4ced92f7027ee214d54a04387e78
  Author: Thrrreeee <shijinrui at bytedance.com>
  Date:   2026-06-18 (Thu, 18 Jun 2026)

  Changed paths:
    M bolt/include/bolt/Core/DIEBuilder.h
    M bolt/include/bolt/Core/DebugData.h
    M bolt/include/bolt/Rewrite/DWARFRewriter.h
    M bolt/lib/Core/DIEBuilder.cpp
    M bolt/lib/Core/DebugData.cpp
    M bolt/lib/Rewrite/DWARFRewriter.cpp
    M bolt/test/X86/dwarf4-cross-cu-backward-different-abbrev.test
    A bolt/test/X86/dwarf4-cross-cu-ranges.test

  Log Message:
  -----------
  [RFC][BOLT] Add a new parallel DWARF processing(2/2) (#197859)

This PR implements a new parallel DWARF debug info processing pipeline
for BOLT that significantly speeds up `--update-debug-sections` for
large binaries. It is the second part of the split from the overall RFC
changes
RFC - [[RFC][BOLT] A New Parallel DWARF Processing Approach in
BOLT](https://discourse.llvm.org/t/rfc-bolt-a-new-parallel-dwarf-processing-approach-in-bolt/90736)
(The overall changes.)

This PR does the following:
1. **Equivalence-class CU partitioning:** Replaces batchsize grouping
with union-find over DW_FORM_ref_addr references. Connected CUs share a
bucket; isolated CUs become singletons.

> For the non-LTO case, CUs have no cross-CU dependencies, so each CU is
placed into its own singleton bucket and processed fully in parallel.
> For the LTO case, CUs with cross-CU dependencies are grouped into the
same bucket and processed sequentially within that bucket, while
different buckets are still processed in parallel.

2. **Per-bucket parallel processing with in-order merge:** Each bucket
gets its own DIEBuilder and local range/loc writers; completed buckets
are then merged sequentially in partition order, applying offset fixups
and emitting CUs to ensure deterministic output.
3. **Add main-binary parallel process** : Main-binary CU update and
split-DWO processing both happen within the same per-bucket task.



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