bool isValid() const {
return Reg != 0;
}
-
- /// Comparisons between register objects
- bool operator==(const Register &Other) const { return Reg == Other.Reg; }
- bool operator!=(const Register &Other) const { return Reg != Other.Reg; }
-
- /// Comparisons against register constants. E.g.
- /// * R == AArch64::WZR
- /// * R == 0
- /// * R == VirtRegMap::NO_PHYS_REG
- bool operator==(unsigned Other) const { return Reg == Other; }
- bool operator!=(unsigned Other) const { return Reg != Other; }
- bool operator==(int Other) const { return Reg == unsigned(Other); }
- bool operator!=(int Other) const { return Reg != unsigned(Other); }
};
// Provide DenseMapInfo for Register
bool isValid() const {
return Reg != 0;
}
-
- /// Comparisons between register objects
- bool operator==(const MCRegister &Other) const { return Reg == Other.Reg; }
- bool operator!=(const MCRegister &Other) const { return Reg != Other.Reg; }
-
- /// Comparisons against register constants. E.g.
- /// * R == AArch64::WZR
- /// * R == 0
- /// * R == VirtRegMap::NO_PHYS_REG
- bool operator==(unsigned Other) const { return Reg == Other; }
- bool operator!=(unsigned Other) const { return Reg != Other; }
- bool operator==(int Other) const { return Reg == unsigned(Other); }
- bool operator!=(int Other) const { return Reg != unsigned(Other); }
};
// Provide DenseMapInfo for MCRegister
// Look for an existing copy.
if (LiveIn)
for (;I != E && I->isCopy(); ++I)
- if (I->getOperand(1).getReg() == Register(PhysReg)) {
+ if (I->getOperand(1).getReg() == PhysReg) {
unsigned VirtReg = I->getOperand(0).getReg();
if (!MRI.constrainRegClass(VirtReg, RC))
llvm_unreachable("Incompatible live-in register class.");