[all-commits] [llvm/llvm-project] 3419e8: [WebAssembly] Free setjmpTable before exiting call...

Heejin Ahn via All-commits all-commits at lists.llvm.org
Mon Aug 30 21:46:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3419e85b15e35e4b5b4d0cd8153fdbe0958e80c7
      https://github.com/llvm/llvm-project/commit/3419e85b15e35e4b5b4d0cd8153fdbe0958e80c7
  Author: Heejin Ahn <aheejin at gmail.com>
  Date:   2021-08-30 (Mon, 30 Aug 2021)

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

  Log Message:
  -----------
  [WebAssembly] Free setjmpTable before exiting calls in EmSjLj

This is an improvement over D107852. We don't need to enumerate specific
function names; we can just check for `noreturn` attribute. This also
requires us to make sure `__resumeExeption` and `emscripten_longjmp`
have `noreturn` attribute too; one of them is a JS function and the
other calls a JS function so Clang does not have a way to deduce they
don't return.

This is effectively NFC, because I'm not sure if there is an additional
case this case covers; if we add a custom function call that has
`noreturn` attribute, it will be processed within the SjLj handling and
turned into `__invoke` call. So this really applies to some special
functions like `emscripten_longjmp`.

Reviewed By: dschuff

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




More information about the All-commits mailing list