[llvm] RegAllocGreedy: Remove unnecessary null register class check (PR #128487)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 02:20:57 PST 2025
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/128487
None
>From 3cdeda60d12da07f13a37b6a1e098c46d62f404c Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Mon, 24 Feb 2025 16:58:12 +0700
Subject: [PATCH] RegAllocGreedy: Remove unnecessary null register class check
---
llvm/lib/CodeGen/RegAllocGreedy.cpp | 3 ---
1 file changed, 3 deletions(-)
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