Added MachineInstr::isRegTiedToDefOperand to check for two-addressness.
[oota-llvm.git] / include / llvm / CodeGen / MachineInstr.h
index 668c4b3635e4c0459f9c6804ea3eeff94e3ec1b8..5c646c6874aa2db3d09d798dae2a4f9a5c3ac786 100644 (file)
@@ -245,6 +245,11 @@ public:
   /// check if the register def is a re-definition due to two addr elimination.
   bool isRegReDefinedByTwoAddr(unsigned DefIdx) const;
 
+  /// isRegTiedToDefOperand - Return true if the use operand of the specified
+  /// index is tied to an def operand. It also returns the def operand index by
+  /// reference if DefOpIdx is not null.
+  bool isRegTiedToDefOperand(unsigned UseOpIdx, unsigned *DefOpIdx = 0);
+
   /// copyKillDeadInfo - Copies kill / dead operand properties from MI.
   ///
   void copyKillDeadInfo(const MachineInstr *MI);