[WebAssembly] Don't do SjLj transformation when there's only setjmp
When there is a `setjmp` call in a function, we transform every callsite of `setjmp` to record its information by calling `saveSetjmp` function, and we also transform every callsite of a function that can longjmp to to check if a longjmp occurred and if so jump to the corresponding post-setjmp BB. Currently we are doing this for every function that contains a call to `setjmp`, but if there is no other function call within that function that can longjmp, this transformation of `setjmp` callsite and all the preparation of `setjmpTable` in the entry of the function are not necessary. This checks if a setjmp-calling function has any other calls that can longjmp, and if not, skips the function for the SjLj transformation. Reviewed By: dschuff Differential Revision: https://reviews.llvm.org/D107530
Loading
Please sign in to comment