[PATCH] D58742: [WebAssembly] Remove uses of ThreadModel

Sam Clegg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 28 10:48:14 PST 2019

sbc100 added a comment.

In D58742#1413077 <https://reviews.llvm.org/D58742#1413077>, @sunfish wrote:

> This is still a little confusing to me. -matomic is supposed to be a subtarget flag, stating that the wasm implementation we will run on supports atomic instructions. -mthread-model posix is about the C++ interpretation -- what style implementation of memory model do we want? In the future, -matomic may become enabled by default, when enough wasm engines generally support it. However, -mthread-model single/posix may still be useful to control independently, because even with wasm engines supporting atomic, there are reasons users might still want to compile their apps single-threaded: access to linear memory with no declared max, lower overall code size, or other things.

" -mthread-model posix is about the C++ interpretation" .. are you sure about that?  `git grep getThreadModel` shows basically no use of this.

Digging a little deeper..  The thread-model thing was introduced here: https://reviews.llvm.org/D4984 and was clearly related to the underlying architecture.  Apart from wasm nobody else has ever starting using this is given it any other meaning as far as I can tell.  Maybe I'm missing something?

  rLLD LLVM Linker



More information about the cfe-commits mailing list