[NFC] Use [MC]Register for Hexagon target
Differential Revision: https://reviews.llvm.org/D91160
diff --git a/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp b/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp
index b45d871..60c2feb 100644
--- a/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp
@@ -97,7 +97,7 @@
bool isFixedInstr(const MachineInstr *MI) const;
void partitionRegisters(UUSetMap &P2Rs);
int32_t profit(const MachineInstr *MI) const;
- int32_t profit(unsigned Reg) const;
+ int32_t profit(Register Reg) const;
bool isProfitable(const USet &Part, LoopRegMap &IRM) const;
void collectIndRegsForLoop(const MachineLoop *L, USet &Rs);
@@ -211,7 +211,7 @@
if (!Op.isReg())
continue;
Register R = Op.getReg();
- if (!Register::isVirtualRegister(R))
+ if (!R.isVirtual())
return true;
}
return false;
@@ -259,7 +259,7 @@
if (&MO == &Op || !MO.isReg() || MO.getSubReg())
continue;
Register T = MO.getReg();
- if (!Register::isVirtualRegister(T)) {
+ if (!T.isVirtual()) {
FixedRegs.set(x);
continue;
}
@@ -399,8 +399,8 @@
return 0;
}
-int32_t HexagonSplitDoubleRegs::profit(unsigned Reg) const {
- assert(Register::isVirtualRegister(Reg));
+int32_t HexagonSplitDoubleRegs::profit(Register Reg) const {
+ assert(Reg.isVirtual());
const MachineInstr *DefI = MRI->getVRegDef(Reg);
switch (DefI->getOpcode()) {
@@ -605,7 +605,7 @@
// For register operands, set the subregister.
Register R = Op.getReg();
unsigned SR = Op.getSubReg();
- bool isVirtReg = Register::isVirtualRegister(R);
+ bool isVirtReg = R.isVirtual();
bool isKill = Op.isKill();
if (isVirtReg && MRI->getRegClass(R) == DoubleRC) {
isKill = false;
@@ -1106,7 +1106,7 @@
if (!Op.isReg() || !Op.isUse())
continue;
Register R = Op.getReg();
- if (!Register::isVirtualRegister(R))
+ if (!R.isVirtual())
continue;
if (MRI->getRegClass(R) != DoubleRC || Op.getSubReg())
continue;