[WebAssembly] Nullify unnecessary setjmp invokes
This is similar to D116619, but now it handles `invoke`s. The reason we didn't handle `invoke`s back then was we didn't support Wasm EH + Wasm SjLj together, and the only case SjLj transformation will see `invoke`s is when we are using Wasm EH. (In Emscripten EH, they would have been transformed to `call`s to invoke wrappers.) But after D117610 we support Wasm EH + Wasm SjLj together and we can nullify `invoke`s to `setjmp` when there is no other longjmpable calls within the function. Actually this is very unlikely to happen in practice, because we treat destructors as longjmpable and also treat `__cxa_end_catch` as longjmpable even if it is not. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D118408
Loading
Please sign in to comment