@@ -30,7 +30,7 @@ template <typename SubPatternT> struct OneUse_match {
30
30
SubPatternT SubPat;
31
31
OneUse_match (const SubPatternT &SP) : SubPat(SP) {}
32
32
33
- bool match (const MachineRegisterInfo &MRI, unsigned Reg) {
33
+ bool match (const MachineRegisterInfo &MRI, Register Reg) {
34
34
return MRI.hasOneUse (Reg) && SubPat.match (MRI, Reg);
35
35
}
36
36
};
@@ -43,7 +43,7 @@ inline OneUse_match<SubPat> m_OneUse(const SubPat &SP) {
43
43
struct ConstantMatch {
44
44
int64_t &CR;
45
45
ConstantMatch (int64_t &C) : CR(C) {}
46
- bool match (const MachineRegisterInfo &MRI, unsigned Reg) {
46
+ bool match (const MachineRegisterInfo &MRI, Register Reg) {
47
47
if (auto MaybeCst = getConstantVRegVal (Reg, MRI)) {
48
48
CR = *MaybeCst;
49
49
return true ;
@@ -60,7 +60,7 @@ inline ConstantMatch m_ICst(int64_t &Cst) { return ConstantMatch(Cst); }
60
60
// that.
61
61
62
62
struct operand_type_match {
63
- bool match (const MachineRegisterInfo &MRI, unsigned Reg) { return true ; }
63
+ bool match (const MachineRegisterInfo &MRI, Register Reg) { return true ; }
64
64
bool match (const MachineRegisterInfo &MRI, MachineOperand *MO) {
65
65
return MO->isReg ();
66
66
}
@@ -123,7 +123,7 @@ template <typename BindTy> struct bind_helper {
123
123
124
124
template <> struct bind_helper <MachineInstr *> {
125
125
static bool bind (const MachineRegisterInfo &MRI, MachineInstr *&MI,
126
- unsigned Reg) {
126
+ Register Reg) {
127
127
MI = MRI.getVRegDef (Reg);
128
128
if (MI)
129
129
return true ;
@@ -132,7 +132,7 @@ template <> struct bind_helper<MachineInstr *> {
132
132
};
133
133
134
134
template <> struct bind_helper <LLT> {
135
- static bool bind (const MachineRegisterInfo &MRI, LLT &Ty, unsigned Reg) {
135
+ static bool bind (const MachineRegisterInfo &MRI, LLT &Ty, Register Reg) {
136
136
Ty = MRI.getType (Reg);
137
137
if (Ty.isValid ())
138
138
return true ;
@@ -142,7 +142,7 @@ template <> struct bind_helper<LLT> {
142
142
143
143
template <> struct bind_helper <const ConstantFP *> {
144
144
static bool bind (const MachineRegisterInfo &MRI, const ConstantFP *&F,
145
- unsigned Reg) {
145
+ Register Reg) {
146
146
F = getConstantFPVRegVal (Reg, MRI);
147
147
if (F)
148
148
return true ;
@@ -325,7 +325,7 @@ struct CheckType {
325
325
LLT Ty;
326
326
CheckType (const LLT &Ty) : Ty(Ty) {}
327
327
328
- bool match (const MachineRegisterInfo &MRI, unsigned Reg) {
328
+ bool match (const MachineRegisterInfo &MRI, Register Reg) {
329
329
return MRI.getType (Reg) == Ty;
330
330
}
331
331
};
0 commit comments