LiveIntervalAnalysis: Cleanup computeDeadValues
[oota-llvm.git] / include / llvm / CodeGen / LiveIntervalAnalysis.h
index 7d79f6275017351d0775fff2a627448c7e2d065d..d8c921fce313700e5e46cf6753c5028a848cc664 100644 (file)
@@ -158,7 +158,7 @@ namespace llvm {
     /// shrinkToUses(LiveInterval *li, SmallVectorImpl<MachineInstr*> *dead)
     /// that works on a subregister live range and only looks at uses matching
     /// the lane mask of the subregister range.
-    bool shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg);
+    void shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg);
 
     /// extendToIndices - Extend the live range of LI to reach all points in
     /// Indices. The points in the Indices array must be jointly dominated by
@@ -406,17 +406,15 @@ namespace llvm {
     /// Compute RegMaskSlots and RegMaskBits.
     void computeRegMasks();
 
-    /// \brief Walk the values in the @p LR live range and compute which ones
-    /// are dead in live range @p Segments.  Dead values are not deleted,
-    /// however:
+    /// Walk the values in @p LI and check for dead values:
     /// - Dead PHIDef values are marked as unused.
-    /// - if @p dead != nullptr then dead operands are marked as such and
-    ///   completely dead machine instructions are added to the @p dead vector.
-    /// - CanSeparate is set to true if the interval may have been separated
-    ///   into multiple connected components.
-    void computeDeadValues(LiveRange &Segments, LiveRange &LR,
-                           bool *CanSeparate = nullptr, unsigned Reg = 0,
-                           SmallVectorImpl<MachineInstr*> *dead = nullptr);
+    /// - Dead operands are marked as such.
+    /// - Completely dead machine instructions are added to the @p dead vector
+    ///   if it is not nullptr.
+    /// Returns true if any PHI value numbers have been removed which may
+    /// have separated the interval into multiple connected components.
+    bool computeDeadValues(LiveInterval &LI,
+                           SmallVectorImpl<MachineInstr*> *dead);
 
     static LiveInterval* createInterval(unsigned Reg);