This is an archive of the discontinued LLVM Phabricator instance.

[NFC][regalloc] Factor accesses to ExtraRegInfo
ClosedPublic

Authored by mtrofin on Nov 29 2021, 5:21 PM.

Details

Summary

We'll move ExtraRegInfo to the RegAllocEvictionAdvisor subsequently.
This change prepares for that by factoring all accesses.

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

Diff Detail

Event Timeline

mtrofin created this revision.Nov 29 2021, 5:21 PM
mtrofin requested review of this revision.Nov 29 2021, 5:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2021, 5:21 PM
qcolombet accepted this revision.Nov 30 2021, 10:29 AM

LGTM, nits below

llvm/lib/CodeGen/RegAllocGreedy.cpp
258

Could you add a comment on what this method does?

270

Ditto: comment on what it does?

Put differently, the method names are not super informative.

275

getCascade followed by setCascade instead?

This revision is now accepted and ready to land.Nov 30 2021, 10:29 AM
mtrofin updated this revision to Diff 390808.Nov 30 2021, 1:25 PM
mtrofin marked 3 inline comments as done.

feedback

mtrofin updated this revision to Diff 390812.Nov 30 2021, 1:49 PM

feedback

llvm/lib/CodeGen/RegAllocGreedy.cpp
258

split the functionality, which gave (I think) a more useful abstraction, that's also easier to describe.

270

Done. We don't actually need this, as we can handle it with setStage and the newly-introduced getOrInitStage

This revision was automatically updated to reflect the committed changes.