This is an archive of the discontinued LLVM Phabricator instance.

[MachineSink] Add a loop sink limit
ClosedPublic

Authored by SjoerdMeijer on Feb 11 2021, 3:41 AM.

Details

Summary

To make sure compile-times don't regress, add an option to restrict the number of instructions considered for sinking as alias analysis can be expensive and for the same reason also skip large blocks.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Feb 11 2021, 3:41 AM
SjoerdMeijer requested review of this revision.Feb 11 2021, 3:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 11 2021, 3:41 AM
shchenz added inline comments.Feb 12 2021, 11:00 PM
llvm/test/CodeGen/AArch64/loop-sink.mir
1052 ↗(On Diff #322940)

Is this expected? Not sure why this is impacted by the patch. Seems the sinking number are just the same as we have same instruction sequence except for the killed flag

Thanks for checking. The unrelated change is gone now.
Locally I had this patch applied on top of D94308, which explains that.

shchenz accepted this revision.Feb 16 2021, 8:23 PM

Thanks for checking. The unrelated change is gone now.
Locally I had this patch applied on top of D94308, which explains that.

Thanks! LGTM.

This revision is now accepted and ready to land.Feb 16 2021, 8:23 PM
This revision was automatically updated to reflect the committed changes.