[llvm] b66ec64 - RegAllocGreedy: Remove unnecessary null register class check (#128487)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 24 07:56:58 PST 2025


Author: Matt Arsenault
Date: 2025-02-24T22:56:54+07:00
New Revision: b66ec64b5b634cbf760d69d1629e462268aa1cbd

URL: https://github.com/llvm/llvm-project/commit/b66ec64b5b634cbf760d69d1629e462268aa1cbd
DIFF: https://github.com/llvm/llvm-project/commit/b66ec64b5b634cbf760d69d1629e462268aa1cbd.diff

LOG: RegAllocGreedy: Remove unnecessary null register class check (#128487)

Added: 
    

Modified: 
    llvm/lib/CodeGen/RegAllocGreedy.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index 08aec54f02408..6b494a2ce006d 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -2710,9 +2710,6 @@ bool RAGreedy::hasVirtRegAlloc() {
     Register Reg = Register::index2VirtReg(I);
     if (MRI->reg_nodbg_empty(Reg))
       continue;
-    const TargetRegisterClass *RC = MRI->getRegClass(Reg);
-    if (!RC)
-      continue;
     if (shouldAllocateRegister(Reg))
       return true;
   }


        


More information about the llvm-commits mailing list