/// ChangeToRegister - Replace this operand with a new register operand of
/// the specified value. If an operand is known to be an register already,
/// the setReg method should be used.
- void ChangeToRegister(unsigned Reg, bool isDef) {
+ void ChangeToRegister(unsigned Reg, bool isDef, bool isImp = false,
+ bool isKill = false, bool isDead = false) {
opType = MO_Register;
contents.RegNo = Reg;
IsDef = isDef;
- IsImp = false;
- IsKill = false;
- IsDead = false;
+ IsImp = isImp;
+ IsKill = isKill;
+ IsDead = isDead;
}
friend std::ostream& operator<<(std::ostream& os, const MachineOperand& mop) {
}
/// findRegisterUseOperand() - Returns the MachineOperand that is a use of
+ /// the specific register or NULL if it is not found. It further tightening
+ /// the search criteria to a use that kills the register if isKill is true.
+ MachineOperand *findRegisterUseOperand(unsigned Reg, bool isKill = false);
+
+ /// findRegisterDefOperand() - Returns the MachineOperand that is a def of
/// the specific register or NULL if it is not found.
- MachineOperand *findRegisterUseOperand(unsigned Reg);
+ MachineOperand *findRegisterDefOperand(unsigned Reg);
/// copyKillDeadInfo - Copies kill / dead operand properties from MI.
///