[llvm] [CodeGen] Stop scanning RegMasks when all masks are identical (PR #217552)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 01:33:40 PDT 2026


================
@@ -94,6 +94,10 @@ class LiveIntervals {
   /// block.
   SmallVector<std::pair<unsigned, unsigned>, 8> RegMaskBlocks;
 
+  /// The register mask pointer shared by every RegMaskBits entry, or nullptr
+  /// when the function uses more than one mask pointer.
+  const uint32_t *SingleRegMask = nullptr;
----------------
arsenm wrote:

Instead of keeping this special case, can you avoid adding duplicate entries to RegMaskBits? Or instead change this to track its own regmask unioning each mask?

https://github.com/llvm/llvm-project/pull/217552


More information about the llvm-commits mailing list