This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Allow findLoopPreheader to return headers with multiple loop successors
ClosedPublic

Authored by dmgreen on May 19 2021, 12:38 AM.

Details

Summary

The findLoopPreheader function will currently not find a preheader if it branches to multiple different loop headers. This patch adds an option to relax that, allowing ARMLowOverheadLoops to process more loops successfully. This helps with WhileLoopStart setup instructions that can branch/fallthrough to the low overhead loop and to branch to a separate loop from the same preheader (but I don't believe it is possible for both loops to be low overhead loops).

Diff Detail

Event Timeline

dmgreen created this revision.May 19 2021, 12:38 AM
dmgreen requested review of this revision.May 19 2021, 12:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2021, 12:38 AM
samtebbs added inline comments.May 20 2021, 2:23 AM
llvm/include/llvm/CodeGen/MachineLoopInfo.h
114
samtebbs accepted this revision.May 20 2021, 3:13 AM

We're go for committing after fixing the little nitpick in the comment :)

This revision is now accepted and ready to land.May 20 2021, 3:13 AM
This revision was landed with ongoing or failed builds.May 24 2021, 4:22 AM
This revision was automatically updated to reflect the committed changes.