Skip to content
Commit 0c3704fd authored by Fangrui Song's avatar Fangrui Song
Browse files

[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 e2054454 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
parent ceb9094a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment