This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Increase coverage of shrink wrapping [4/5]
ClosedPublic

Authored by rafauler on May 20 2022, 8:24 PM.

Details

Summary

Change shrink-wrapping to try a priority list of save
positions, instead of trying the best one and giving up if it doesn't
work. This also increases coverage.

Diff Detail

Event Timeline

rafauler created this revision.May 20 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2022, 8:24 PM
Herald added a subscriber: mgrang. · View Herald Transcript
rafauler requested review of this revision.May 20 2022, 8:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2022, 8:24 PM
Amir accepted this revision.Jun 14 2022, 8:00 PM

To reiterate:

  1. This diff changes the way save location is handled: instead of computing and keeping a single place for a given register, store the list of potential locations.
  2. This is done in order to work around the issue when the single best location might be discarded down the stream, cancelling the move of a spill-fill for a given register.
  3. In order to support iterating over save locations, computeDomOrder needs to be updated multiple times.

As a side effect of this change, we also fix an issue where the critical edge is split for a given reg placement, but the placement is canceled.

This revision is now accepted and ready to land.Jun 14 2022, 8:00 PM
This revision was automatically updated to reflect the committed changes.