[llvm] 8d21985 - [RegisterScavenging] Delete dead function unprocess().

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 13:19:53 PDT 2020


Author: Eli Friedman
Date: 2020-08-27T13:19:32-07:00
New Revision: 8d21985a752416823a803d74f9265c4e148003a0

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

LOG: [RegisterScavenging] Delete dead function unprocess().

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/RegisterScavenging.h
    llvm/lib/CodeGen/RegisterScavenging.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/RegisterScavenging.h b/llvm/include/llvm/CodeGen/RegisterScavenging.h
index 5b5a80a67e7f..7bcd45150905 100644
--- a/llvm/include/llvm/CodeGen/RegisterScavenging.h
+++ b/llvm/include/llvm/CodeGen/RegisterScavenging.h
@@ -89,15 +89,6 @@ class RegScavenger {
     while (MBBI != I) forward();
   }
 
-  /// Invert the behavior of forward() on the current instruction (undo the
-  /// changes to the available registers made by forward()).
-  void unprocess();
-
-  /// Unprocess instructions until you reach the provided iterator.
-  void unprocess(MachineBasicBlock::iterator I) {
-    while (MBBI != I) unprocess();
-  }
-
   /// Update internal register state and move MBB iterator backwards.
   /// Contrary to unprocess() this method gives precise results even in the
   /// absence of kill flags.

diff  --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp
index 41b6de1441d7..a8ba5ea3fa8b 100644
--- a/llvm/lib/CodeGen/RegisterScavenging.cpp
+++ b/llvm/lib/CodeGen/RegisterScavenging.cpp
@@ -154,25 +154,6 @@ void RegScavenger::determineKillsAndDefs() {
   }
 }
 
-void RegScavenger::unprocess() {
-  assert(Tracking && "Cannot unprocess because we're not tracking");
-
-  MachineInstr &MI = *MBBI;
-  if (!MI.isDebugInstr()) {
-    determineKillsAndDefs();
-
-    // Commit the changes.
-    setUnused(DefRegUnits);
-    setUsed(KillRegUnits);
-  }
-
-  if (MBBI == MBB->begin()) {
-    MBBI = MachineBasicBlock::iterator(nullptr);
-    Tracking = false;
-  } else
-    --MBBI;
-}
-
 void RegScavenger::forward() {
   // Move ptr forward.
   if (!Tracking) {


        


More information about the llvm-commits mailing list