[all-commits] [llvm/llvm-project] 839093: [IR] Avoid collecting COMDATs for non-module print...
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Wed Sep 16 18:46:11 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 839093dddb95ca2680310ae880267e558d9f492c
https://github.com/llvm/llvm-project/commit/839093dddb95ca2680310ae880267e558d9f492c
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M llvm/lib/IR/AsmWriter.cpp
Log Message:
-----------
[IR] Avoid collecting COMDATs for non-module printing (#221460)
`AssemblyWriter` scans every global object in its constructor to collect
referenced COMDATs. That collection is only used when printing a
complete module, but the constructor also runs for standalone value and
instruction printing.
Move COMDAT emission into `printModule()`. Print each group at its first
global-object use and keep only a local set to avoid duplicate
declarations.
On `bench/sqlite/original/shell.ll` from `llvm-opt-benchmark`, the
median `opt -passes=dot-cfg` time dropped from 1.65 s to 0.40 s, about
4.1x faster. All 687 generated DOT files matched after normalizing
process-specific node IDs.
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