[llvm] r348647 - Delete registerScope function

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 13:31:14 PST 2018


Author: aheejin
Date: Fri Dec  7 13:31:14 2018
New Revision: 348647

URL: http://llvm.org/viewvc/llvm-project?rev=348647&view=rev
Log:
Delete registerScope function

`unregisterScope()` is not currently used, so removing it.

Modified:
    llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp

Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp?rev=348647&r1=348646&r2=348647&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp Fri Dec  7 13:31:14 2018
@@ -78,12 +78,11 @@ class WebAssemblyCFGStackify final : pub
   // <LOOP|TRY marker, Loop/exception bottom BB> map
   DenseMap<const MachineInstr *, MachineBasicBlock *> BeginToBottom;
 
-  // Helper functions to register / unregister scope information created by
-  // marker instructions.
+  // Helper functions to register scope information created by marker
+  // instructions.
   void registerScope(MachineInstr *Begin, MachineInstr *End);
   void registerTryScope(MachineInstr *Begin, MachineInstr *End,
                         MachineBasicBlock *EHPad);
-  void unregisterScope(MachineInstr *Begin);
 
   MachineBasicBlock *getBottom(const MachineInstr *Begin);
 
@@ -182,23 +181,6 @@ void WebAssemblyCFGStackify::registerTry
   EHPadToTry[EHPad] = Begin;
 }
 
-void WebAssemblyCFGStackify::unregisterScope(MachineInstr *Begin) {
-  assert(BeginToEnd.count(Begin));
-  MachineInstr *End = BeginToEnd[Begin];
-  assert(EndToBegin.count(End));
-  BeginToEnd.erase(Begin);
-  EndToBegin.erase(End);
-  MachineBasicBlock *EHPad = TryToEHPad.lookup(Begin);
-  if (EHPad) {
-    assert(EHPadToTry.count(EHPad));
-    TryToEHPad.erase(Begin);
-    EHPadToTry.erase(EHPad);
-  }
-  MachineBasicBlock *Bottom = BeginToBottom.lookup(Begin);
-  if (Bottom)
-    BeginToBottom.erase(Begin);
-}
-
 // Given a LOOP/TRY marker, returns its bottom BB. Use cached information if any
 // to prevent recomputation.
 MachineBasicBlock *




More information about the llvm-commits mailing list