This is an archive of the discontinued LLVM Phabricator instance.

Move Repl to SectionBase
ClosedPublic

Authored by rafael on Dec 13 2017, 10:30 AM.

Details

Reviewers
ruiu
Summary

It is currently in InputSectionBase. Only InputSections are used in ICF, so Repl should be move to InputSection to clear the class hierarchy or like this patch does to SectionBase for convenience.

The convenience of having it on the base class is that we can just access the replacement without having to first check if it is an InputSection. It is a bit less code and a bit faster as some of this code is very hot.

I got up to 1.77% improvement in clang-gdb-index and no regressions according to lnt.

Diff Detail

Event Timeline

rafael created this revision.Dec 13 2017, 10:30 AM
ruiu accepted this revision.Dec 13 2017, 1:48 PM

LGTM

This revision is now accepted and ready to land.Dec 13 2017, 1:48 PM
espindola closed this revision.Mar 14 2018, 3:10 PM
espindola added a subscriber: espindola.

r320654