Index: include/llvm/CodeGen/LiveIntervals.h =================================================================== --- include/llvm/CodeGen/LiveIntervals.h +++ include/llvm/CodeGen/LiveIntervals.h @@ -418,6 +418,13 @@ RegUnitRanges[Unit] = nullptr; } + /// Remove associated live ranges for the register units associated with \p + /// Reg. Subsequent uses should rely on on-demand recomputation. + void removePhysReg(unsigned Reg) { + for (MCRegUnitIterator Units(Reg, TRI); Units.isValid(); ++Units) + removeRegUnit(*Units); + } + /// Remove value numbers and related live segments starting at position /// \p Pos that are part of any liverange of physical register \p Reg or one /// of its subregisters.