]> granicus.if.org Git - llvm/commit
[WebAssembly] Remove uses of ThreadModel
authorThomas Lively <tlively@google.com>
Thu, 28 Feb 2019 18:39:08 +0000 (18:39 +0000)
committerThomas Lively <tlively@google.com>
Thu, 28 Feb 2019 18:39:08 +0000 (18:39 +0000)
commitf71ec6c9f145548357caaed4da9a806c5c2c2b11
tree7580c5a7fcb9f99664f3d4eb55ad6396219567ae
parent21f76dad359120cb00b1712b338515d6e64b0a10
[WebAssembly] Remove uses of ThreadModel

Summary:
In the clang UI, replaces -mthread-model posix with -matomics as the
source of truth on threading. In the backend, replaces
-thread-model=posix with the atomics target feature, which is now
collected on the WebAssemblyTargetMachine along with all other used
features. These collected features will also be used to emit the
target features section in the future.

The default configuration for the backend is thread-model=posix and no
atomics, which was previously an invalid configuration. This change
makes the default valid because the thread model is ignored.

A side effect of this change is that objects are never emitted with
passive segments. It will instead be up to the linker to decide
whether sections should be active or passive based on whether atomics
are used in the final link.

Reviewers: aheejin, sbc100, dschuff

Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, steven_wu, dexonsmith, rupprecht, jfb, jdoerfert, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D58742

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355112 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
lib/Target/WebAssembly/WebAssemblyTargetMachine.h
test/CodeGen/WebAssembly/atomic-mem-consistency.ll
test/CodeGen/WebAssembly/atomic-rmw.ll
test/CodeGen/WebAssembly/global.ll
test/CodeGen/WebAssembly/tls.ll
test/CodeGen/WebAssembly/vtable.ll
test/MC/WebAssembly/bss.ll
test/MC/WebAssembly/comdat.ll
test/MC/WebAssembly/debug-info.ll
test/MC/WebAssembly/explicit-sections.ll
test/MC/WebAssembly/external-data.ll
test/MC/WebAssembly/external-func-address.ll
test/MC/WebAssembly/global-ctor-dtor.ll
test/MC/WebAssembly/init-flags.ll [deleted file]
test/MC/WebAssembly/reloc-data.ll
test/MC/WebAssembly/unnamed-data.ll
test/MC/WebAssembly/weak-alias.ll
test/tools/llvm-nm/wasm/local-symbols.ll
test/tools/llvm-objdump/WebAssembly/relocations.test