This is an archive of the discontinued LLVM Phabricator instance.

[LoopRotate] Don't split loop pass manager
ClosedPublic

Authored by nikic on Apr 3 2021, 12:02 PM.

Details

Summary

After D99249 we use three different loop pass managers for LICM, LoopRotate and LICM+LoopUnswitch. This happens because LazyBFI and LazyBPI are not preserved by LoopRotate (note that D74640 is no longer needed). Avoid this by marking them as preserved.

My understanding of D86156 is that it is okay to simply preserve them (which LoopUnswitch already does for the same reason) and rely on callbacks to deal with deleted blocks.

Compile-time (only affects LegacyPM): https://llvm-compile-time-tracker.com/compare.php?from=665065821e6ae11deb9796a27b97a399e4bb3b0d&to=3163a33f4d6fec546df2723b9c55da41342716a5&stat=instructions

Diff Detail

Event Timeline

nikic created this revision.Apr 3 2021, 12:02 PM
nikic requested review of this revision.Apr 3 2021, 12:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 3 2021, 12:02 PM
nikic retitled this revision from [LoopRotate] Don't split pass manager to [LoopRotate] Don't split loop pass manager.Apr 3 2021, 12:04 PM
asbirlea accepted this revision.Apr 5 2021, 8:58 AM
This revision is now accepted and ready to land.Apr 5 2021, 8:58 AM
This revision was landed with ongoing or failed builds.Apr 8 2021, 1:05 PM
This revision was automatically updated to reflect the committed changes.
uabelho added a subscriber: uabelho.Apr 9 2021, 2:06 AM

Hi,

Do you know how this change affects the resulting code on average?

I'm seeing a regression in one of our benchmarks, one loop seems to look different after opt and then our backend fails to recognize it as a hardware loop anymore.
I'm not sure if it's possible to make a hardware loop out of this one too, just thought I'd ask if you've seen any major differences in the output?

bjope added a subscriber: bjope.Apr 12 2021, 5:21 AM