This is an archive of the discontinued LLVM Phabricator instance.

[NFC][Regalloc] Share the VirtRegAuxInfo object with LiveRangeEdit
ClosedPublic

Authored by mtrofin on Feb 17 2021, 1:45 PM.

Details

Summary

VirtRegAuxInfo is an extensibility point, so the register allocator's
decision on which implementation to use should be communicated to the
other users - namely, LiveRangeEdit.

Diff Detail

Event Timeline

mtrofin created this revision.Feb 17 2021, 1:45 PM
mtrofin requested review of this revision.Feb 17 2021, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2021, 1:45 PM
wmi added a comment.Feb 18 2021, 3:21 PM

It makes sense to share the same VRAI during the RA course for a particular type of allocator.

llvm/lib/CodeGen/RegAllocPBQP.cpp
803–811

Did you see any problem by using PBQP VRAI?

llvm/lib/CodeGen/SplitKit.h
463–464

Unnecessary to pass LIS, VRM and MBFI since they are all included in VRAI?

lkail added a subscriber: lkail.Feb 18 2021, 4:30 PM
mtrofin marked 2 inline comments as done.Feb 18 2021, 6:55 PM
mtrofin added inline comments.
llvm/lib/CodeGen/RegAllocPBQP.cpp
803–811

Tests passed fine, however, I'd prefer decoupling that fix from this change: should there be a regression in the field for the users of PBQP, it'd be revertible without affecting this change.

llvm/lib/CodeGen/SplitKit.h
463–464

They aren't public though. We can change the API, but I think that's a separate patch, wdyt?

Also, it'd be debatable if that doesn't couple SplitEditor to the fact that VRAI has such members. But we can discuss that there.

wmi accepted this revision.Feb 18 2021, 11:29 PM

LGTM.

This revision is now accepted and ready to land.Feb 18 2021, 11:29 PM
This revision was automatically updated to reflect the committed changes.
mtrofin marked 2 inline comments as done.