This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Restore original linkage of externals prior to splitting
ClosedPublic

Authored by tobiasvk on Jan 15 2016, 9:07 AM.

Details

Summary

This is a companion patch for http://reviews.llvm.org/D16124.

Internalized symbols increase the size of strongly-connected components in
SCC-based module splitting and thus reduce the amount of parallelism. This
patch records the original linkage of non-local symbols prior to
internalization and then restores it just before splitting/CodeGen. This is
also useful for cases where the linker requires symbols to remain external, for
instance, so they can be placed according to linker script rules.

It's currently under its own flag (-restore-globals) but should eventually
share a common flag with D16124.

Diff Detail

Event Timeline

tobiasvk updated this revision to Diff 45003.Jan 15 2016, 9:07 AM
tobiasvk retitled this revision from to [LTO] Restore original linkage of externals prior to splitting.
tobiasvk updated this object.
tobiasvk added reviewers: pcc, mehdi_amini.
tobiasvk added a subscriber: llvm-commits.
mehdi_amini edited edge metadata.Jan 15 2016, 9:16 AM

That LGTM, but let's wait a bit for Peter to comment.

pcc accepted this revision.Jan 15 2016, 11:02 AM
pcc edited edge metadata.

LGTM, but this should land after D16124.

This revision is now accepted and ready to land.Jan 15 2016, 11:02 AM
tobiasvk closed this revision.Jan 18 2016, 3:28 PM