Page MenuHomePhabricator

[LoopRotate] Get and update MSSA only if available in legacy pass manager.

Authored by asbirlea on Feb 13 2020, 11:47 AM.



Potential fix for: and

In the legacy pass manager, loop rotate need not compute MemorySSA when not being in the same loop pass manager with other loop passes.
There isn't currently a way to differentiate between the two cases, so this attempts to limit the usage in LoopRotate to only update MemorySSA when the analysis is already available.
The side-effect of this is that it will split the Loop pipeline.

This issue does not apply to the new pass manager, where we have a flag specifying if all loop passes in that loop pass manager preserve MemorySSA.

Diff Detail

Event Timeline

asbirlea created this revision.Feb 13 2020, 11:47 AM
dmgreen accepted this revision.Feb 14 2020, 12:58 AM

Sounds like a good idea to me.

This revision is now accepted and ready to land.Feb 14 2020, 12:58 AM
fhahn added a subscriber: fhahn.Feb 14 2020, 2:54 AM

This workaround seems fine. I don't think there should be much interaction between LoopRotate and LICM/LoopUnswitch and running LoopRotate on all loops first should not really pessimism optimisations.


I think it would be good to add a comment that this will split the loop pipeline, to delay computing MemorySSA/skipping relatively costly updates?

This revision was automatically updated to reflect the committed changes.
asbirlea marked an inline comment as done.