[PATCH] D94044: [WebAssembly] Remove unreachable EH pads
Heejin Ahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 4 15:49:21 PST 2021
aheejin created this revision.
aheejin added reviewers: dschuff, tlively.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
aheejin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This removes unreachable EH pads in LateEHPrepare. This is not for
optimization but for preparation for CFGStackify. In CFGStackify, we
determine where to place `try` marker by computing the nearest common
dominator of all predecessors of an EH pad, but when an EH pad does not
have a predecessor, it becomes tricky. We can insert an empty dummy BB
before the EH pad and place the `try` there, but removing unreachable EH
pads is simpler.
This moves an existing exception label test from eh-label.mir to
exception.mir and adds a new test there.
This also adds some comments to existing methods.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94044
Files:
llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
llvm/test/CodeGen/WebAssembly/eh-labels.mir
llvm/test/CodeGen/WebAssembly/exception.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94044.314468.patch
Type: text/x-patch
Size: 4841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210104/09f27b60/attachment.bin>
More information about the llvm-commits
mailing list