[WebAssembly] Rename wasm.catch.exn intrinsic back to wasm.catch
authorHeejin Ahn <aheejin@gmail.com>
Wed, 25 Aug 2021 02:43:28 +0000 (19:43 -0700)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 25 Aug 2021 21:19:22 +0000 (14:19 -0700)
commitc2c9a3fd9c2c2d293e31d2e406a255fb18e4bb81
treee4202740c9bd8632f423ac2ed3751bc5fe802ef3
parent5213f307abf2d2ce70c103e758f2e72b24539cb3
[WebAssembly] Rename wasm.catch.exn intrinsic back to wasm.catch

The plan was to use `wasm.catch.exn` intrinsic to catch exceptions and
add `wasm.catch.longjmp` intrinsic, that returns two values (setjmp
buffer and return value), later to catch longjmps. But because we
decided not to use multivalue support at the moment, we are going to use
one intrinsic that returns a single value for both exceptions and
longjmps. And even if it's not for that, I now think the naming of
`wasm.catch.exn` is a little weird, because the intrinsic can still take
a tag immediate, which means it can be used for anything, not only
exceptions, as long as that returns a single value.

This partially reverts D107405.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D108683
llvm/include/llvm/IR/IntrinsicsWebAssembly.td
llvm/lib/CodeGen/WasmEHPrepare.cpp
llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
llvm/test/CodeGen/WebAssembly/wasmehprepare.ll