[PATCH] D109670: [WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 12 19:17:20 PDT 2021


aheejin created this revision.
aheejin added a reviewer: dschuff.
Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100.
aheejin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a fix on top of D106525 <https://reviews.llvm.org/D106525>'s Case 2. In D106525 <https://reviews.llvm.org/D106525>, in
`runEHOnFunction` which handles Emscripten EH, We rethrow `longjmp` only
when the module has any usage of `setjmp` or `longjmp`. But now Wasm
object files are linked using wasm-ld, the module this pass sees is not
the whole program, and even if this module does not contain any
`longjmp`, another file can contain it and can be linked with the
current module. This enables the rethrowing of longjmp whenever
Emscripten SjLj is enabled, regardless of whether it is used in this
module or not.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109670

Files:
  llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  llvm/test/CodeGen/WebAssembly/lower-em-ehsjlj-sjlj-not-used.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109670.372148.patch
Type: text/x-patch
Size: 4829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210913/7792c91e/attachment.bin>


More information about the llvm-commits mailing list