[llvm] 1434313 - [LiveRegMatrix] Use MCRegUnit instead of MCRegister for register unit. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 10:58:08 PST 2025
Author: Craig Topper
Date: 2025-01-20T10:57:34-08:00
New Revision: 1434313bd8c425b2aadc301ddaf42a91552e609e
URL: https://github.com/llvm/llvm-project/commit/1434313bd8c425b2aadc301ddaf42a91552e609e
DIFF: https://github.com/llvm/llvm-project/commit/1434313bd8c425b2aadc301ddaf42a91552e609e.diff
LOG: [LiveRegMatrix] Use MCRegUnit instead of MCRegister for register unit. NFC
MCRegister should be used for registers, not register units.
Added:
Modified:
llvm/include/llvm/CodeGen/LiveRegMatrix.h
llvm/lib/CodeGen/LiveRegMatrix.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/LiveRegMatrix.h b/llvm/include/llvm/CodeGen/LiveRegMatrix.h
index 373f4402dd8d64..ce781080291075 100644
--- a/llvm/include/llvm/CodeGen/LiveRegMatrix.h
+++ b/llvm/include/llvm/CodeGen/LiveRegMatrix.h
@@ -161,7 +161,7 @@ class LiveRegMatrix {
/// Use MCRegUnitIterator to enumerate all regunits in the desired PhysReg.
/// This returns a reference to an internal Query data structure that is only
/// valid until the next query() call.
- LiveIntervalUnion::Query &query(const LiveRange &LR, MCRegister RegUnit);
+ LiveIntervalUnion::Query &query(const LiveRange &LR, MCRegUnit RegUnit);
/// Directly access the live interval unions per regunit.
/// This returns an array indexed by the regunit number.
diff --git a/llvm/lib/CodeGen/LiveRegMatrix.cpp b/llvm/lib/CodeGen/LiveRegMatrix.cpp
index 83df95e71002a3..cfda262aac82de 100644
--- a/llvm/lib/CodeGen/LiveRegMatrix.cpp
+++ b/llvm/lib/CodeGen/LiveRegMatrix.cpp
@@ -184,7 +184,7 @@ bool LiveRegMatrix::checkRegUnitInterference(const LiveInterval &VirtReg,
}
LiveIntervalUnion::Query &LiveRegMatrix::query(const LiveRange &LR,
- MCRegister RegUnit) {
+ MCRegUnit RegUnit) {
LiveIntervalUnion::Query &Q = Queries[RegUnit];
Q.init(UserTag, LR, Matrix[RegUnit]);
return Q;
@@ -206,7 +206,7 @@ LiveRegMatrix::checkInterference(const LiveInterval &VirtReg,
// Check the matrix for virtual register interference.
bool Interference = foreachUnit(TRI, VirtReg, PhysReg,
- [&](MCRegister Unit, const LiveRange &LR) {
+ [&](MCRegUnit Unit, const LiveRange &LR) {
return query(LR, Unit).checkInterference();
});
if (Interference)
More information about the llvm-commits
mailing list