Inline initOffsetMap.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 3 Apr 2018 21:38:18 +0000 (21:38 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 3 Apr 2018 21:38:18 +0000 (21:38 +0000)
commit6cd7af51e1a478db7835096b85aac9cc3f464636
treee222d4527e647675b20fd5f3bddf49196d35c4f7
parentd506bf8e3d0ff9f2637269553c43328b8b0e7371
Inline initOffsetMap.

In the lld perf builder r328686 had a negative impact in
stalled-cycles-frontend. Somehow that stat is not showing on my
machine, but the attached patch shows an improvement on cache-misses,
which is probably a reasonable proxy.

My working theory is that given a large input the pieces vector is out
of cache by the time initOffsetMap runs.

Both finalizeContents implementation have a convenient location for
initializing the OffsetMap, so this seems the best solution.

llvm-svn: 329117
lld/ELF/InputSection.cpp
lld/ELF/InputSection.h
lld/ELF/SyntheticSections.cpp