Fix comment.
[oota-llvm.git] / include / llvm / CodeGen / LiveIntervalAnalysis.h
index 451905f0889c6a43eb04e8af50309b48c7cfe343..ebd63c809624e05649084c0f63b262fb22fe3373 100644 (file)
@@ -57,6 +57,10 @@ namespace llvm {
 
     BitVector allocatableRegs_;
 
+    /// JoinedLIs - Keep track which register intervals have been coalesced
+    /// with other intervals.
+    BitVector JoinedLIs;
+
   public:
     struct CopyRec {
       MachineInstr *MI;
@@ -119,8 +123,7 @@ namespace llvm {
     }
 
     bool hasInterval(unsigned reg) const {
-      Reg2IntervalMap::const_iterator I = r2iMap_.find(reg);
-      return I != r2iMap_.end();
+      return r2iMap_.count(reg);
     }
 
     /// getMBBStartIdx - Return the base index of the first instruction in the
@@ -258,14 +261,20 @@ namespace llvm {
     bool AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB,
                               MachineInstr *CopyMI);
 
-    /// hasRegisterUse - Returns true if there is any use of the specific
-    /// reg between indexes Start and End.
-    bool hasRegisterUse(unsigned Reg, unsigned Start, unsigned End);
+    /// lastRegisterUse - Returns the last use of the specific register between
+    /// cycles Start and End. It also returns the use operand by reference. It
+    /// returns NULL if there are no uses.
+    MachineInstr *lastRegisterUse(unsigned Reg, unsigned Start, unsigned End,
+                                  MachineOperand *&MOU);
 
-    /// unsetRegisterKill - Unset IsKill property of all uses of specific
+    /// unsetRegisterKill - Unset IsKill property of all uses of the specific
     /// register of the specific instruction.
     void unsetRegisterKill(MachineInstr *MI, unsigned Reg);
 
+    /// hasRegisterDef - True if the instruction defines the specific register.
+    ///
+    bool hasRegisterDef(MachineInstr *MI, unsigned Reg);
+
     static LiveInterval createInterval(unsigned Reg);
 
     void removeInterval(unsigned Reg) {