This is an archive of the discontinued LLVM Phabricator instance.

[hot-cold-split] Only perform splitting in ThinLTO backend post-link
ClosedPublic

Authored by tejohnson on Oct 23 2018, 2:07 PM.

Details

Summary

Fix the new PM to only perform hot cold splitting once during ThinLTO,
by skipping it in the pre-link phase.

This was already fixed in the old PM by the move of the hot cold split
pass later (after the early return when PrepareForThinLTO) by r344869.

Diff Detail

Event Timeline

tejohnson created this revision.Oct 23 2018, 2:07 PM
vsk accepted this revision.Oct 23 2018, 2:15 PM

Thank you! For completeness, it might help to have a test for the case 'Phase = PostLink'. Happy to leave it to you to decide.

This revision is now accepted and ready to land.Oct 23 2018, 2:15 PM
In D53611#1273295, @vsk wrote:

Thank you! For completeness, it might help to have a test for the case 'Phase = PostLink'. Happy to leave it to you to decide.

I did initially, but it caused a large number of perturbations of the expected sequence since hot cold splitting invalidated a bunch of analysis passes, so I decided just to test the change being made here.

This revision was automatically updated to reflect the committed changes.