[PATCH] D59281: [WebAssembly] "atomics" feature requires shared memory

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 22:28:03 PDT 2019


sbc100 accepted this revision.
sbc100 added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/test/wasm/shared-memory.yaml:80
+# ATOMICS-NEXT:       - Flags:           [ HAS_MAX, IS_SHARED ]
+# ATOMICS-NEXT:         Initial:         0x00000002
+# ATOMICS-NEXT:         Maximum:         0x00000002
----------------
This block looks exactly the same as the one above.  Perhaps you only need one?


================
Comment at: lld/wasm/Writer.cpp:915
+  if (TargetFeatures.count("atomics"))
+    Config->SharedMemory = true;
+
----------------
tlively wrote:
> sbc100 wrote:
> > I think we decided against this part right?    i.e. atomics should require but not imply shared memory?  So this should probably be an error instead.
> Yes, sorry. I updated the name and description but I haven't updated the code yet. This CL is going to be blocked on an upcoming CL that detects whether any atomics were stripped. Landing that first will avoid unnecessary turn in some tests.
Use single quotes to avoid the escape char?  Here and below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59281





More information about the llvm-commits mailing list