[PATCH] D58315: [WebAssembly] Add .shared directive for shared memory

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 19 09:47:59 PST 2019


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


================
Comment at: llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp:654
 
+    if (DirectiveID.getString() == ".shared") {
+      TOut.emitShared();
----------------
aardappel wrote:
> This applies to the most recent symbol? Seems many directives we have explicitly refer to the symbol they're changing, like .functype, .eventtype, .globaltype, so would it make sense for this to that too?
> 
> Or is there only ever one such flag and one such symbol, ever?
There is meant to only ever be one such flag for the entire module, and the only memory import is the `__linear_memory` symbol that this affects. Currently the ObjectFileWriter unconditionally emits `__linear_memory`, and this only modifies the flags it is emitted with.


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