[all-commits] [llvm/llvm-project] b7b4eb: [WebAssembly] Rethrow longjmp in EH handling if Em...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Mon Sep 13 14:16:20 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7b4ebbcfa463a7fae61dca7cec30c5b747bdec8
      https://github.com/llvm/llvm-project/commit/b7b4ebbcfa463a7fae61dca7cec30c5b747bdec8
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2021-09-13 (Mon, 13 Sep 2021)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
    A llvm/test/CodeGen/WebAssembly/lower-em-ehsjlj-sjlj-not-used.ll

  Log Message:
  -----------
  [WebAssembly] Rethrow longjmp in EH handling if EmSjLj is enabled

This is a fix on top of D106525's Case 2. In 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.

Reviewed By: dschuff

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




More information about the All-commits mailing list