[PATCH] D58315: [WebAssembly] Add .shared_memory directive

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 20 17:54:15 PST 2019


tlively marked an inline comment as done.
tlively added a comment.

An alternative to the approach taken in this CL that explicitly records that the object is thread-aware in a new metadata section is presented here: https://github.com/WebAssembly/tool-conventions/pull/99



================
Comment at: llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp:163
+  Sym->setMemFlags(wasm::WASM_LIMITS_FLAG_HAS_MAX |
+                   wasm::WASM_LIMITS_FLAG_IS_SHARED);
+}
----------------
sbc100 wrote:
> It still seems wrong to attach this information to a symbol, is there not some module level state we can attach it too?
> 
> I don't think __linear_memory should be and MCSymbol at all.  We don't have a symbol type for a memory.   It looks like it is referenced in WasmObjectWriter.cpp but I can't see why it would be.
Changing approaches to use a target features section would make this change to MCSymbol unnecessary (although WasmObjectWriter would still treat __linear_memory as a symbol).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58315/new/

https://reviews.llvm.org/D58315





More information about the llvm-commits mailing list