[all-commits] [llvm/llvm-project] f178f6: [WebAssembly] Nullify unnecessary setjmp calls
Heejin Ahn via All-commits
all-commits at lists.llvm.org
Tue Jan 4 17:45:05 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f178f61e1dd29e2e97d608fa5191f93e50a1be63
https://github.com/llvm/llvm-project/commit/f178f61e1dd29e2e97d608fa5191f93e50a1be63
Author: Heejin Ahn <aheejin at gmail.com>
Date: 2022-01-04 (Tue, 04 Jan 2022)
Changed paths:
M llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
M llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
Log Message:
-----------
[WebAssembly] Nullify unnecessary setjmp calls
D107530 did a small optimization that, if a function contains `setjmp`
calls but not other calls that can `longjmp`, we don't do SjLj
transformation on those `setjmp` calls, because they don't have
possibilities of returning from `longjmp`.
But we should remove those `setjmp` calls even in that case, because
Emscripten doesn't provide that function, assuming it is lowered away by
SjLj transformation. `setjmp` always returns 0 when called directly, so
this CL replaces them with `i32 0`.
Fixes https://github.com/emscripten-core/emscripten/issues/15679.
Reviewed By: dschuff
Differential Revision: https://reviews.llvm.org/D116619
More information about the All-commits
mailing list