[llvm] 931a68f - RegAllocFast: Remove dead code

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 06:38:37 PDT 2020


Author: Matt Arsenault
Date: 2020-06-04T09:38:31-04:00
New Revision: 931a68f26b9a3de853807ffad7b2cd0a2dd30922

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

LOG: RegAllocFast: Remove dead code

Added: 
    

Modified: 
    llvm/lib/CodeGen/RegAllocFast.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
index cd65ba840eab..157b32b8c749 100644
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -133,7 +133,6 @@ namespace {
     RegUnitSet UsedInInstr;
 
     void setPhysRegState(MCPhysReg PhysReg, unsigned NewState);
-    bool isPhysRegFree(MCPhysReg PhysReg) const;
 
     /// Mark a physreg as used in this instruction.
     void markRegUsedInInstr(MCPhysReg PhysReg) {
@@ -226,7 +225,6 @@ namespace {
     bool mayLiveOut(Register VirtReg);
     bool mayLiveIn(Register VirtReg);
 
-    void printRegUnitState(unsigned State) const;
     void dumpState() const;
   };
 
@@ -242,14 +240,6 @@ void RegAllocFast::setPhysRegState(MCPhysReg PhysReg, unsigned NewState) {
     RegUnitStates[*UI] = NewState;
 }
 
-bool RegAllocFast::isPhysRegFree(MCPhysReg PhysReg) const {
-  for (MCRegUnitIterator UI(PhysReg, TRI); UI.isValid(); ++UI) {
-    if (RegUnitStates[*UI] != regFree)
-      return false;
-  }
-  return true;
-}
-
 /// This allocates space for the specified virtual register to be held on the
 /// stack.
 int RegAllocFast::getStackSpaceFor(Register VirtReg) {


        


More information about the llvm-commits mailing list