Skip to content

Commit 1434313

Browse files
committed
[LiveRegMatrix] Use MCRegUnit instead of MCRegister for register unit. NFC
MCRegister should be used for registers, not register units.
1 parent 2c9cc78 commit 1434313

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/include/llvm/CodeGen/LiveRegMatrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class LiveRegMatrix {
161161
/// Use MCRegUnitIterator to enumerate all regunits in the desired PhysReg.
162162
/// This returns a reference to an internal Query data structure that is only
163163
/// valid until the next query() call.
164-
LiveIntervalUnion::Query &query(const LiveRange &LR, MCRegister RegUnit);
164+
LiveIntervalUnion::Query &query(const LiveRange &LR, MCRegUnit RegUnit);
165165

166166
/// Directly access the live interval unions per regunit.
167167
/// This returns an array indexed by the regunit number.

llvm/lib/CodeGen/LiveRegMatrix.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ bool LiveRegMatrix::checkRegUnitInterference(const LiveInterval &VirtReg,
184184
}
185185

186186
LiveIntervalUnion::Query &LiveRegMatrix::query(const LiveRange &LR,
187-
MCRegister RegUnit) {
187+
MCRegUnit RegUnit) {
188188
LiveIntervalUnion::Query &Q = Queries[RegUnit];
189189
Q.init(UserTag, LR, Matrix[RegUnit]);
190190
return Q;
@@ -206,7 +206,7 @@ LiveRegMatrix::checkInterference(const LiveInterval &VirtReg,
206206

207207
// Check the matrix for virtual register interference.
208208
bool Interference = foreachUnit(TRI, VirtReg, PhysReg,
209-
[&](MCRegister Unit, const LiveRange &LR) {
209+
[&](MCRegUnit Unit, const LiveRange &LR) {
210210
return query(LR, Unit).checkInterference();
211211
});
212212
if (Interference)

0 commit comments

Comments
 (0)