This is an archive of the discontinued LLVM Phabricator instance.

[LoopSink] Require MemorySSA
ClosedPublic

Authored by nikic on Apr 7 2022, 1:07 AM.

Details

Summary

This makes MemorySSA in LoopSink required, and removes the AST-based implementation, as well as the related support code in LICM.

Diff Detail

Event Timeline

nikic created this revision.Apr 7 2022, 1:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 1:07 AM
nikic requested review of this revision.Apr 7 2022, 1:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2022, 1:07 AM
asbirlea accepted this revision.Apr 7 2022, 1:30 PM

This cleanup is beautiful!
Thank you!!

This revision is now accepted and ready to land.Apr 7 2022, 1:30 PM
fhahn accepted this revision.Apr 7 2022, 2:12 PM

LGTM, thanks!

llvm/lib/Transforms/Scalar/LICM.cpp
1138

I guess the APIs could also be updated to take MSSAUby reference, so we don't have to assert here.

Added nits, but happy if this goes in as is too.

llvm/lib/Transforms/Scalar/LICM.cpp
161

These two APIs could be made consistent to either have the Loop and BB as the first argument, or MSSA and MU. Not worth bike-shedding though..

1219–1223

The two if conditions can be && appended; I believe this was the case before I split the MSSA and AST code paths.

This revision was landed with ongoing or failed builds.Apr 8 2022, 12:50 AM
This revision was automatically updated to reflect the committed changes.
nikic marked an inline comment as done.
nikic marked an inline comment as done.Apr 8 2022, 1:11 AM
nikic added inline comments.
llvm/lib/Transforms/Scalar/LICM.cpp
1138

I landed some follow-up conversion from pointers to references in https://github.com/llvm/llvm-project/commit/c8c63625601c04786cbf0819708725b830f0dfbb.