HomePhabricator

[WebAssembly] Remove unnecessary instructions after TRY marker placement

Authored by aheejin on Feb 26 2019, 4:50 PM.

Description

[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

llvm-svn: 354939