[llvm] [Hexagon] Use LiveRegUnits (PR #84112)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 08:59:13 PST 2024


https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/84112

>From 9743c6f06c429047ef926baf2509968a6bdf1590 Mon Sep 17 00:00:00 2001
From: Rose <gfunni234 at gmail.com>
Date: Tue, 5 Mar 2024 17:35:23 -0500
Subject: [PATCH] [Hexagon] Use LiveRegUnits

---
 llvm/lib/Target/Hexagon/HexagonGenMux.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Target/Hexagon/HexagonGenMux.cpp b/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
index 509144ceb6a049..e906bcfe700292 100644
--- a/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonGenMux.cpp
@@ -26,7 +26,7 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
-#include "llvm/CodeGen/LivePhysRegs.h"
+#include "llvm/CodeGen/LiveRegUnits.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
@@ -346,11 +346,11 @@ bool HexagonGenMux::genMuxInBlock(MachineBasicBlock &B) {
 
   // Fix up kill flags.
 
-  LivePhysRegs LPR(*HRI);
+  LiveRegUnits LPR(*HRI);
   LPR.addLiveOuts(B);
   auto IsLive = [&LPR, this](unsigned Reg) -> bool {
     for (MCPhysReg S : HRI->subregs_inclusive(Reg))
-      if (LPR.contains(S))
+      if (!LPR.available(S))
         return true;
     return false;
   };



More information about the llvm-commits mailing list