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 @@ public: 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) {