When promoting the result of fp_to_uint/fp_to_sint,
[oota-llvm.git] / lib / CodeGen / SimpleRegisterCoalescing.h
index 39c90716b603466147315367837032c8b60dbde1..abe392990d1ce2299dcb48092e9eb5219d6e712f 100644 (file)
@@ -100,6 +100,10 @@ namespace llvm {
     ///
     SmallPtrSet<MachineInstr*, 32> ReMatCopies;
 
+    /// ReMatDefs - Keep track of definition instructions which have
+    /// been remat'ed.
+    SmallPtrSet<MachineInstr*, 8> ReMatDefs;
+
   public:
     static char ID; // Pass identifcation, replacement for typeid
     SimpleRegisterCoalescing() : MachineFunctionPass(&ID) {}
@@ -265,6 +269,11 @@ namespace llvm {
     /// live range is dead. Return true if live interval is removed.
     bool ShortenDeadCopySrcLiveRange(LiveInterval &li, MachineInstr *CopyMI);
 
+    /// RemoveDeadDef - If a def of a live interval is now determined dead,
+    /// remove the val# it defines. If the live interval becomes empty, remove
+    /// it as well.
+    bool RemoveDeadDef(LiveInterval &li, MachineInstr *DefMI);
+
     /// lastRegisterUse - Returns the last use of the specific register between
     /// cycles Start and End or NULL if there are no uses.
     MachineOperand *lastRegisterUse(unsigned Start, unsigned End, unsigned Reg,