[PATCH] D53240: [WebAssembly] WebAssemblyLowerEmscriptenEHSjLj: use getter/setter for accessing tempRet0

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 12 19:31:57 PDT 2018


sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.

Rather than assuming that tempRet0 exists in linear memory only assume
the getter/setter functions exist.  This avoids conflicting with
binaryen which declares a wasm global for this purpose and defines
its own getter and setter for that.

The other advantage of doing things this way is that it leaving
it up to the linker/finalizer to decide how to actually store this
temporary.  As it happens binaryen uses a wasm global which is more
appropriate since it is thread safe.

This also allows us to change the way this is stored in the future
(memory, TLS memory, wasm global) without modifying LLVM.


Repository:
  rL LLVM

https://reviews.llvm.org/D53240

Files:
  lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
  test/CodeGen/WebAssembly/lower-em-exceptions.ll
  test/CodeGen/WebAssembly/lower-em-sjlj.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53240.169537.patch
Type: text/x-patch
Size: 13858 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181013/6dce6ec2/attachment.bin>


More information about the llvm-commits mailing list