[all-commits] [llvm/llvm-project] be0efa: [WebAssembly] Handle EH terminate pads for cleanup

Heejin Ahn via All-commits all-commits at lists.llvm.org
Sat Feb 6 08:41:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be0efa1f2368c007b9ecb533db42102166ce9a17
      https://github.com/llvm/llvm-project/commit/be0efa1f2368c007b9ecb533db42102166ce9a17
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2021-02-06 (Sat, 06 Feb 2021)

  Changed paths:
    M llvm/lib/Target/WebAssembly/CMakeLists.txt
    M llvm/lib/Target/WebAssembly/WebAssembly.h
    A llvm/lib/Target/WebAssembly/WebAssemblyHandleEHTerminatePads.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
    M llvm/test/CodeGen/WebAssembly/exception.ll

  Log Message:
  -----------
  [WebAssembly] Handle EH terminate pads for cleanup

Terminate pads, cleanup pads with `__clang_call_terminate` call, have
`catch` instruction in them because `__clang_call_terminate` takes an
exception pointer. But these terminate pads should be reached also in
case of foreign exception. So this pass attaches an additional
`catch_all` BB after every terminate pad BB, with a call to
`std::terminate`.

Reviewed By: tlively

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




More information about the All-commits mailing list