]> granicus.if.org Git - llvm/commit
[WebAssembly] Remove unnecessary instructions after TRY marker placement
authorHeejin Ahn <aheejin@gmail.com>
Wed, 27 Feb 2019 00:50:53 +0000 (00:50 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 27 Feb 2019 00:50:53 +0000 (00:50 +0000)
commit6596fa33d78283374d1729eac54482798b9d0983
tree8214bb9a55fea76a87ab29d23cf50f8f5f4bc1d6
parent96e27952a5fff89f3f21e6d05d8306feffe2376e
[WebAssembly] Remove unnecessary instructions after TRY marker placement

Summary:
This removes unnecessary instructions after TRY marker placement. There
are two cases:
- `end`/`end_block` can be removed if they overlap with `try`/`end_try`
  and they have the same return types.
- `br` right before `catch` that branches to after `end_try` can be
  deleted.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58591

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354939 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
test/CodeGen/WebAssembly/cfg-stackify-eh.ll
test/CodeGen/WebAssembly/exception.ll