[llvm] [LiveRegUnits] Use MCRegister instead of MCPhysReg in interface. NFC (PR #128232)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 13:05:22 PST 2025


https://github.com/topperc created https://github.com/llvm/llvm-project/pull/128232

None

>From 4eb1f7b75d3352b5e40bdbdfa9c46dd5fb34d177 Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Fri, 21 Feb 2025 13:04:24 -0800
Subject: [PATCH] [LiveRegUnits] Use MCRegister instead of MCPhysReg in
 interface. NFC

---
 llvm/include/llvm/CodeGen/LiveRegUnits.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/llvm/include/llvm/CodeGen/LiveRegUnits.h b/llvm/include/llvm/CodeGen/LiveRegUnits.h
index 405a9c123d041..2afb1046fb6e1 100644
--- a/llvm/include/llvm/CodeGen/LiveRegUnits.h
+++ b/llvm/include/llvm/CodeGen/LiveRegUnits.h
@@ -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())
@@ -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);
   }
@@ -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;



More information about the llvm-commits mailing list