[all-commits] [llvm/llvm-project] 41ba39: [WebAssembly] Don't do SjLj transformation when th...
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Thu Aug 5 15:29:04 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 41ba39dfcd0a765f238561ce1b52f843c825ff9a
https://github.com/llvm/llvm-project/commit/41ba39dfcd0a765f238561ce1b52f843c825ff9a
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2021-08-05 (Thu, 05 Aug 2021)
Changed paths:
M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
M llvm/test/CodeGen/WebAssembly/lower-em-sjlj-alias.ll
M llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list