[llvm] [CodeGen] Stop scanning RegMasks when all masks are identical (PR #217552)
Liu Ke via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 03:50:53 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;
----------------
Sockke wrote:
Thanks, that makes sense. I will replace the pointer-based special case with
an aggregate register mask computed while collecting RegMaskBits.
checkRegMaskInterference will stop once UsableRegs reaches that aggregate,
since applying additional masks cannot change the result. Otherwise, it will
retain the existing full scan.
https://github.com/llvm/llvm-project/pull/217552
More information about the llvm-commits
mailing list