This is an archive of the discontinued LLVM Phabricator instance.

[Pipelines] Add LoopSink and DivRemPairs to LTO post-link pipeline
ClosedPublic

Authored by nikic on Apr 14 2023, 7:38 AM.

Details

Summary

As pointed out in D148010, these passes are missing from the LTO post-link pipeline. They are present in the pre-link pipeline, but LoopSink is completely useless there (it will always be fully undone by LICM post-link) and DivRemPairs is mostly useless (I believe most of what it does will be undone by InstCombine).

I've not added RelLookupTableConverterPass, because it's also disabled in the LTO pre-link pipeline, with a comment that there is an unresolved issue with full LTO.

Compile-time impact of the extra passes is minimal: http://llvm-compile-time-tracker.com/compare.php?from=09ba7b605327812cfcec4f3c01d7fc232dee651d&to=52d546b4fe89ad66011ca9e3a8f2f6dfe4b4ac2f&stat=instructions:u Of course, LoopSink will have a larger impact in PGO builds.

Diff Detail

Event Timeline

nikic created this revision.Apr 14 2023, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 7:38 AM
nikic requested review of this revision.Apr 14 2023, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2023, 7:38 AM
aeubanks accepted this revision.Apr 14 2023, 9:58 AM
aeubanks added inline comments.
llvm/lib/Passes/PassBuilderPipelines.cpp
1836

this runs after the function passes in the module optimization pipeline

This revision is now accepted and ready to land.Apr 14 2023, 9:58 AM