[llvm] r354685 - LiveIntervals: Add removeAllRegUnitsForPhysReg
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 22 11:03:31 PST 2019
Author: arsenm
Date: Fri Feb 22 11:03:31 2019
New Revision: 354685
URL: http://llvm.org/viewvc/llvm-project?rev=354685&view=rev
Log:
LiveIntervals: Add removeAllRegUnitsForPhysReg
Convenience wrapper for removing the reg units of
a physical register.
Modified:
llvm/trunk/include/llvm/CodeGen/LiveIntervals.h
Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervals.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervals.h?rev=354685&r1=354684&r2=354685&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveIntervals.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveIntervals.h Fri Feb 22 11:03:31 2019
@@ -417,6 +417,15 @@ class VirtRegMap;
RegUnitRanges[Unit] = nullptr;
}
+ /// Remove associated live ranges for the register units associated with \p
+ /// Reg. Subsequent uses should rely on on-demand recomputation. \note This
+ /// method can result in inconsistent liveness tracking if multiple phyical
+ /// registers share a regunit, and should be used cautiously.
+ void removeAllRegUnitsForPhysReg(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.
More information about the llvm-commits
mailing list