This is an archive of the discontinued LLVM Phabricator instance.

Add an option for ICFing data
ClosedPublic

Authored by rafael on Dec 10 2017, 5:15 PM.

Details

Reviewers
ruiu
Summary

An internal linker has support for merging identical data and in some cases it can be a significant win.

This is behind an off by default flag so it has to be requested explicitly.

Diff Detail

Event Timeline

rafael created this revision.Dec 10 2017, 5:15 PM
ruiu edited edge metadata.Dec 11 2017, 9:14 AM

We used to merge data for COFF but not anymore because it causes nasty problems that are hard to find and debug. E.g. https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c24

Are you sure you don't have that kind of issue?

ruiu added a comment.Dec 11 2017, 10:47 AM

Got it. If you are using this option from the beginning, it should be fine.

It's not a big deal, but --icf-data sounds a bit odd, because ICF is short for Identical *Code* Folding. I have no better idea though.

ELF/Options.td
146

Please rewrite the description so that it doesn't sound odd even if it's not displayed after --icf.

Rebased and updated description.

ruiu accepted this revision.Dec 11 2017, 3:13 PM

LGTM

--icf-data is not technically a correct name but that's probably the best name.

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

r320448