[PATCH] D58486: [WebAssembly] Delete ThrowUnwindDest map from WasmEHFuncInfo

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 18:28:49 PST 2019


aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: llvm-commits, sunfish, jgravelle-google, sbc100.
Herald added a project: LLVM.

Before when we implemented the first EH proposal, 'catch <tag>'
instruction may not catch an exception so there were multiple EH pads an
exception can unwind to. That means a BB could have multiple EH pad
successors.

Now after we switched to the new proposal, every 'catch' instruction
catches an exception, and there is only one catchpad per catchswitch, so
we at most have one EH pad successor, making `ThrowUnwindDest` map in
`WasmEHInfo` unnecessary.

Keeping `ThrowUnwindDest` map in `WasmEHInfo` has its own problems,
because other optimization passes can split a BB that contains possibly
throwing calls (previously invokes), and we have to update the map every
time that happens, which is not easy for common CodeGen passes.


Repository:
  rL LLVM

https://reviews.llvm.org/D58486

Files:
  include/llvm/CodeGen/WasmEHFuncInfo.h
  lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/WasmEHPrepare.cpp
  lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58486.187712.patch
Type: text/x-patch
Size: 5139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190221/c7ddb6f4/attachment.bin>


More information about the llvm-commits mailing list