This is an archive of the discontinued LLVM Phabricator instance.

[NFC][Regalloc] Split canEvictInterference into hint and general
ClosedPublic

Authored by mtrofin on Nov 16 2021, 11:34 AM.

Details

Summary

There are 2 eviction queries. One is made by tryAssign, when it attempts to
free an interference occupying the hint of the candidate. The other is
during 'regular' interference resolution, where we scan over all
physical registers and try to see if we can evict live ranges in favor
of the candidate. We currently use the same logic in both cases, just
that the former never passes the cost to any subsequent query.
Technically, the 2 decisions could be implemented with different
policies.

This patch splits the 2.

RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-November/153639.html

Diff Detail

Event Timeline

mtrofin created this revision.Nov 16 2021, 11:34 AM
mtrofin requested review of this revision.Nov 16 2021, 11:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2021, 11:34 AM
mtrofin updated this revision to Diff 388221.Nov 18 2021, 8:44 AM

comments, also the hint-based query doesn't need the hint bool

mtrofin retitled this revision from [NFC][Regalloc] Split canEvictInterference|BasedOnCost to [NFC][Regalloc] Split canEvictInterference into hint and general.Nov 18 2021, 8:44 AM

Gentle (post-holiday) reminder. Thanks!

qcolombet accepted this revision.Nov 29 2021, 11:52 AM
This revision is now accepted and ready to land.Nov 29 2021, 11:52 AM
This revision was landed with ongoing or failed builds.Nov 29 2021, 4:04 PM
This revision was automatically updated to reflect the committed changes.