diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp index b1955017c68..f8f5f4040c8 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp @@ -78,12 +78,11 @@ class WebAssemblyCFGStackify final : public MachineFunctionPass { // <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::registerTryScope(MachineInstr *Begin, 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 * |