This is an archive of the discontinued LLVM Phabricator instance.

[LoopPeel][NFCI] Simplify the code to calculate peel count for PGO
ClosedPublic

Authored by ikudrin on Apr 25 2022, 7:13 AM.

Details

Summary

This reorganizes the code as a preparation for D123865:

  • Use more descriptive names for variables
  • Simplify a condition by use an already calculated value for MaxPeelCount
  • Remove a duplicate log entry
  • Report basic values for loop costs

Diff Detail

Event Timeline

ikudrin created this revision.Apr 25 2022, 7:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 7:13 AM
davidxl accepted this revision.Apr 25 2022, 8:05 PM

This patch slightly changes the behavior (e.g consider alreadyPeeled when comparing with size threshold), but looks more correct. LGTM.

This revision is now accepted and ready to land.Apr 25 2022, 8:05 PM
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.