Skip to content

[LiveRegUnits] Use MCRegister instead of MCPhysReg in interface. NFC #128232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions llvm/include/llvm/CodeGen/LiveRegUnits.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ class LiveRegUnits {
bool empty() const { return Units.none(); }

/// Adds register units covered by physical register \p Reg.
void addReg(MCPhysReg Reg) {
void addReg(MCRegister Reg) {
for (MCRegUnit Unit : TRI->regunits(Reg))
Units.set(Unit);
}

/// Adds register units covered by physical register \p Reg that are
/// part of the lanemask \p Mask.
void addRegMasked(MCPhysReg Reg, LaneBitmask Mask) {
void addRegMasked(MCRegister Reg, LaneBitmask Mask) {
for (MCRegUnitMaskIterator Unit(Reg, TRI); Unit.isValid(); ++Unit) {
LaneBitmask UnitMask = (*Unit).second;
if ((UnitMask & Mask).any())
Expand All @@ -99,7 +99,7 @@ class LiveRegUnits {
}

/// Removes all register units covered by physical register \p Reg.
void removeReg(MCPhysReg Reg) {
void removeReg(MCRegister Reg) {
for (MCRegUnit Unit : TRI->regunits(Reg))
Units.reset(Unit);
}
Expand All @@ -113,7 +113,7 @@ class LiveRegUnits {
void addRegsInMask(const uint32_t *RegMask);

/// Returns true if no part of physical register \p Reg is live.
bool available(MCPhysReg Reg) const {
bool available(MCRegister Reg) const {
for (MCRegUnit Unit : TRI->regunits(Reg)) {
if (Units.test(Unit))
return false;
Expand Down