Delete registerScope function
`unregisterScope()` is not currently used, so removing it.
llvm-svn: 348647
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
index b195501..f8f5f40 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
@@ -78,12 +78,11 @@
// <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 @@
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 *