This is an archive of the discontinued LLVM Phabricator instance.

[NFC][regalloc] Pass RAGreedy to eviction adviser
ClosedPublic

Authored by mtrofin on Jan 5 2022, 9:29 AM.

Details

Summary

This patch simplifies the interface between RAGreedy and the eviction
adviser by passing the allocator to the adviser, which allows the latter
to extract needed information as needed, rather than requiring it be passed
piecemeal at construction time (which would also complicate later
evolution).

Part of this, the patch also moves ExtraRegInfo back to RAGreedy. We
keep the encapsulation of ExtraRegInfo because it has benefits (e.g.
improved readability by abstracting access to the cascade info) and also
simpler re-initialization at regalloc pass re-entry time (we just flush
the Optional).

Diff Detail

Event Timeline

mtrofin created this revision.Jan 5 2022, 9:29 AM
mtrofin requested review of this revision.Jan 5 2022, 9:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2022, 9:29 AM

Gentle reminder - thanks!

qcolombet accepted this revision.Jan 10 2022, 11:28 AM
This revision is now accepted and ready to land.Jan 10 2022, 11:28 AM
This revision was landed with ongoing or failed builds.Jan 10 2022, 11:56 AM
This revision was automatically updated to reflect the committed changes.