[WebAssembly] Make SjLj lowering globals thread-local
authorThomas Lively <tlively@google.com>
Thu, 24 Sep 2020 21:56:19 +0000 (14:56 -0700)
committerThomas Lively <tlively@google.com>
Thu, 24 Sep 2020 21:56:19 +0000 (14:56 -0700)
commit1c5a3c4d382353e582ecf4913e338599028e267f
tree8f4c44cb82df9a04db400a9f4ced1a263a70231e
parenta079f619b5a1959af8af37cabdea27ae542903db
[WebAssembly] Make SjLj lowering globals thread-local

Emscripten's longjump and exception mechanism depends on two global variables,
`__THREW__` and `__threwValue`, which are changed to be defined as thread-local
in https://github.com/emscripten-core/emscripten/pull/12056. This patch updates
the corresponding code in the WebAssembly backend to properly declare these
globals as thread-local as well.

Differential Revision: https://reviews.llvm.org/D88262
llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
llvm/test/CodeGen/WebAssembly/lower-em-exceptions.ll
llvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll