diff options
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.h')
| -rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeEdit.h b/llvm/lib/CodeGen/LiveRangeEdit.h index 363f4d7572a..a784826e95f 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.h +++ b/llvm/lib/CodeGen/LiveRangeEdit.h @@ -34,6 +34,11 @@ public: struct Delegate { /// Called immediately before erasing a dead machine instruction. virtual void LRE_WillEraseInstruction(MachineInstr *MI) {} + + /// Called when a virtual register is no longer used. Return false to defer + /// its deletion from LiveIntervals. + virtual bool LRE_CanEraseVirtReg(unsigned) { return true; } + virtual ~Delegate() {} }; @@ -150,6 +155,10 @@ public: return rematted_.count(ParentVNI); } + /// eraseVirtReg - Notify the delegate that Reg is no longer in use, and try + /// to erase it from LIS. + void eraseVirtReg(unsigned Reg, LiveIntervals &LIS); + /// eliminateDeadDefs - Try to delete machine instructions that are now dead /// (allDefsAreDead returns true). This may cause live intervals to be trimmed /// and further dead efs to be eliminated. |

