[llvm] [WebAssembly] Don't return multivalue when Emscripten EH/SjLj is used (PR #86048)

Heejin Ahn via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 16:20:35 PDT 2024


aheejin wrote:

> > One thing to think about is, given that Emscripten EH is off by default but Emscripten SjLj is on by default unless you use Wasm EH, this may turn off multivalue returns for more cases than we intend to. So to sum up,
> > 
> > * Enabling Emscripten EH automatically means enabling Emscripten SjLj
> > * Enabling Wasm EH automatically means enabling Wasm SjLj
> > * Enabling neither EH means enabling Emscripten SjLJ
> >   
> >   * This can change later when Wasm EH is supported universally, but likely not in the near future
> 
> So if you really want multivalue returns, the only way to get them after this change is by also enabling Wasm EH?

Either that or explicitly changing longjmp support via `-sSUPPORT_LONGJMP=wasm` or `-sSUPPORT_LONGJMP=0`. But yeah I don't think people would do that. I was mostly thinking about Emscripten EH when I was working on this and disabling multivalue whenever Emscripten SjLj is enabled can be too much. I guess I need to rethink; will make the PR a draft in the meantime.

https://github.com/llvm/llvm-project/pull/86048


More information about the llvm-commits mailing list