-bool LiveVariables::KillsRegister(MachineInstr *MI, unsigned Reg) const {
- for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
- MachineOperand &MO = MI->getOperand(i);
- if (MO.isReg() && MO.isKill()) {
- if ((MO.getReg() == Reg) ||
- (MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
- MRegisterInfo::isPhysicalRegister(Reg) &&
- RegInfo->isSubRegister(MO.getReg(), Reg)))
- return true;
- }
- }
- return false;
-}
-
-bool LiveVariables::RegisterDefIsDead(MachineInstr *MI, unsigned Reg) const {
- for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
- MachineOperand &MO = MI->getOperand(i);
- if (MO.isReg() && MO.isDead()) {
- if ((MO.getReg() == Reg) ||
- (MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
- MRegisterInfo::isPhysicalRegister(Reg) &&
- RegInfo->isSubRegister(MO.getReg(), Reg)))
- return true;
- }
- }
- return false;
-}
-
-bool LiveVariables::ModifiesRegister(MachineInstr *MI, unsigned Reg) const {
- for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
- MachineOperand &MO = MI->getOperand(i);
- if (MO.isReg() && MO.isDef() && MO.getReg() == Reg)
- return true;
- }
- return false;
-}
-
-void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo,