[PATCH] D55295: LiveIntervals: Add removePhysReg

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 13:38:44 PST 2018


arsenm created this revision.
arsenm added a reviewer: MatzeB.
Herald added a subscriber: wdng.

Convenience wrapper for removing the reg units of a physical register.


https://reviews.llvm.org/D55295

Files:
  include/llvm/CodeGen/LiveIntervals.h


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55295.176704.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181204/6d8b483e/attachment.bin>


More information about the llvm-commits mailing list