[all-commits] [llvm/llvm-project] 0c3704: [ELF] Deduplicate names of local symbols only with...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Feb 1 10:10:34 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c3704fdbd901e5f51acf11a85278bf9214ae7b2
https://github.com/llvm/llvm-project/commit/0c3704fdbd901e5f51acf11a85278bf9214ae7b2
Author: Fangrui Song <i at maskray.me>
Date: 2022-02-01 (Tue, 01 Feb 2022)
Changed paths:
M lld/ELF/SyntheticSections.cpp
M lld/docs/ReleaseNotes.rst
A lld/test/ELF/strtab-dedup.s
Log Message:
-----------
[ELF] Deduplicate names of local symbols only with -O2
The deduplication requires a DenseMap of the same size of the local part of
.strtab . I optimized it in e20544543478b259eb09fa0a253d4fb1a5525d9e but it is
still quite slow.
For Release build of clang, deduplication makes .strtab 1.1% smaller and makes the link 3% slower.
For chrome, deduplication makes .strtab 0.1% smaller and makes the link 6% slower.
I suggest that we only perform the optimization with -O2 (default is -O1).
Not deduplicating local symbol names will simplify parallel symbol table write.
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D118577
More information about the All-commits
mailing list