[PATCH] D59343: [WebAssembly] Use passive segments when memory is shared
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 14:01:27 PDT 2019
sbc100 added inline comments.
================
Comment at: lld/test/wasm/data-segment-merging.ll:12
; RUN: llc -filetype=obj %s -o %t.data-segment-merging.o
+; RUN: llc -filetype=obj %s -o %t.data-segment-merging.atomics.o -mattr=+atomics
----------------
tlively wrote:
> sbc100 wrote:
> > The code looks like passive initiazlition is driver by the "--shared-memory" flag rather than atomics. Wouldn't it make more sense to use "SHARED" over "ATOMICS" in this test?
> D59284 makes the "atomics" feature imply the use of shared memory, and in this test the flag that causes shared memory to be used is `-mattr=+atomics`, so I think the current naming accurately describes what is happening. I expect the common way to get shared memory is by using the atomics feature, so perhaps we can even deprecate the --shared-memory flag, WDYT?
I'm not sure. Part of me likes the explicit requirment/ability to pass this kind of thing as a linker flag. I think shared vs non-shared memory is significant enough that I'm not sure it should be driven my object file input.
e.g. As a developer, I don't necessarily want the accidental inclusion of the bad object file to change the type of output object. It would be like infering `-shared` if I pass objects build with `-PIC`. I think I'd rather get a linker error (object files use atomics, did you mean to pass --shared-memory?)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59343/new/
https://reviews.llvm.org/D59343
More information about the llvm-commits
mailing list