This is an archive of the discontinued LLVM Phabricator instance.

[LoopPeel][NFC] Exit early if there is no room for peeling
ClosedPublic

Authored by ikudrin on Apr 15 2022, 10:13 AM.

Diff Detail

Unit TestsFailed

Event Timeline

ikudrin created this revision.Apr 15 2022, 10:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2022, 10:13 AM
ikudrin requested review of this revision.Apr 15 2022, 10:13 AM
mkazantsev accepted this revision.Apr 18 2022, 12:41 AM
This revision is now accepted and ready to land.Apr 18 2022, 12:41 AM
fhahn added inline comments.Apr 19 2022, 3:50 AM
llvm/lib/Transforms/Utils/LoopPeel.cpp
389

I think it's not quite clear what 'no room' means here. the condition here checks 2 things: 1) the size after peeling one iteration exceeds the threshold and 2) that there is at least on iteration to peel.

It would be good to include both in the comment here.

ikudrin updated this revision to Diff 424383.Apr 21 2022, 11:12 PM
ikudrin marked an inline comment as done.
  • Update the comment.
  • Remove checking for !UnrollPeelMaxCount because a similar condition is anyway checked in line 397.
This revision was landed with ongoing or failed builds.Apr 26 2022, 7:45 AM
This revision was automatically updated to reflect the committed changes.