This is an archive of the discontinued LLVM Phabricator instance.

Move "Eliminate Available Externally" immediately after the inliner
ClosedPublic

Authored by mehdi_amini on May 2 2016, 10:09 AM.

Details

Summary

This pass is supposed to reduce the size of the IR for compile time
purpose. We should run it ASAP.

Diff Detail

Event Timeline

mehdi_amini retitled this revision from to Move "Eliminate Available Externally" immediately after the inliner.
mehdi_amini updated this object.
mehdi_amini added a reviewer: chandlerc.
mehdi_amini added a subscriber: llvm-commits.
tejohnson added inline comments.
lib/Transforms/IPO/PassManagerBuilder.cpp
410

Does the same concern apply to ThinLTO (want to preserve them for inlining later on as in LTO)? If not, why?

mehdi_amini updated this revision to Diff 56005.May 3 2016, 8:25 AM

Preserve available_externally for ThinLTO

mehdi_amini added inline comments.May 3 2016, 8:29 AM
lib/Transforms/IPO/PassManagerBuilder.cpp
410

Clang will set PrepareForLTO even when -flto=thin. But I'm not sure if it is a good thing, we may want to distinguish between the two so it seems better to me to not rely on PrepareForLTO in ThinLTO mode.

mehdi_amini updated this revision to Diff 56008.May 3 2016, 8:30 AM

Remove unexpected change that slipped in

LGTM

lib/Transforms/IPO/PassManagerBuilder.cpp
410

Ah, I had forgotten that PrepareForLTO included all -flto settings. Now that we have PrepareForThinLTO I like the idea of separating them. Probably should then change PrepareForLTO to PrepareForFullLTO to disambiguate (not here, but as a separate cleanup).

mehdi_amini accepted this revision.May 3 2016, 8:52 AM
mehdi_amini added a reviewer: mehdi_amini.

r268394

This revision is now accepted and ready to land.May 3 2016, 8:52 AM
mehdi_amini closed this revision.May 3 2016, 8:52 AM