[all-commits] [llvm/llvm-project] 4e4df1: [WebAssembly] Remove unreachable EH pads

Heejin Ahn via All-commits all-commits at lists.llvm.org
Sat Jan 9 03:47:47 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e4df1e38d6b66083b3badb78e56b8b0f6045fd1
      https://github.com/llvm/llvm-project/commit/4e4df1e38d6b66083b3badb78e56b8b0f6045fd1
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2021-01-09 (Sat, 09 Jan 2021)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyLateEHPrepare.cpp
    R llvm/test/CodeGen/WebAssembly/eh-labels.mir
    A llvm/test/CodeGen/WebAssembly/exception.mir

  Log Message:
  -----------
  [WebAssembly] Remove unreachable EH pads

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.

Reviewed By: dschuff, tlively

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




More information about the All-commits mailing list