Skip to content
Commit c9a6e827 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

COFF: Optimize ICF by not creating temporary vectors.

Previously, ICF created a vector for each SectionChunk. The vector
contained pointers to successors, which are namely associative sections
and COMDAT relocation targets. The reason I created vectors is because
I thought that that would make section comparison faster.

It did make the comparison faster. When self-linking, for example, it
saved about 10 ms on each iteration. The time we spent on constructing
the vectors was 124 ms. If we iterate more than 12 times, return from
the investment exceeds the initial cost.

In reality, it usually needs 5 iterations. So we shouldn't construct
the vectors.

llvm-svn: 247963
parent 038bf833
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment