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

Dan Gohman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 13:34:30 PDT 2019


sunfish added a comment.

In D59281#1429332 <https://reviews.llvm.org/D59281#1429332>, @sbc100 wrote:

> In D59281#1429109 <https://reviews.llvm.org/D59281#1429109>, @sunfish wrote:
>
> > In the future, atomics will likely be enabled by default, however it will continue to be desirable to be able to select non-shared memory, since non-shared memory doesn't require a maximum size, and since it can make interoperating with JS and other external code simpler. Is it possible to structure this patch in a way that supports this?
>
>
> When building for non-shared memory, shouldn't input code check for "ifdef _REENTRANT" and not generate any atomic instructions?


That, or they could use -mthread-model single and lower atomics into non-atomics.

It sounds like the answer is, users that want non-shared memory should use -mno-atomics. I guess that works, it's just surprising if we think of -matomics as a pure target feature flag.


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