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

Thomas Lively via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 27 15:03:34 PST 2019


tlively created this revision.
tlively added reviewers: aheejin, sbc100, dschuff.
Herald added subscribers: llvm-commits, cfe-commits, jdoerfert, jfb, rupprecht, dexonsmith, steven_wu, sunfish, hiraditya, jgravelle-google, mehdi_amini.
Herald added projects: clang, LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D58742

Files:
  clang/include/clang/Driver/Options.td
  clang/include/clang/Driver/ToolChain.h
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/WebAssembly.cpp
  clang/lib/Driver/ToolChains/WebAssembly.h
  clang/test/Driver/wasm-toolchain.c
  clang/test/Preprocessor/wasm-target-features.c
  lld/test/wasm/init-fini.ll
  lld/test/wasm/lto/atomics.ll
  lld/wasm/LTO.cpp
  llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.h
  llvm/test/CodeGen/WebAssembly/atomic-mem-consistency.ll
  llvm/test/CodeGen/WebAssembly/atomic-rmw.ll
  llvm/test/CodeGen/WebAssembly/global.ll
  llvm/test/CodeGen/WebAssembly/tls.ll
  llvm/test/CodeGen/WebAssembly/vtable.ll
  llvm/test/MC/WebAssembly/bss.ll
  llvm/test/MC/WebAssembly/comdat.ll
  llvm/test/MC/WebAssembly/debug-info.ll
  llvm/test/MC/WebAssembly/explicit-sections.ll
  llvm/test/MC/WebAssembly/external-data.ll
  llvm/test/MC/WebAssembly/external-func-address.ll
  llvm/test/MC/WebAssembly/global-ctor-dtor.ll
  llvm/test/MC/WebAssembly/init-flags.ll
  llvm/test/MC/WebAssembly/reloc-data.ll
  llvm/test/MC/WebAssembly/unnamed-data.ll
  llvm/test/MC/WebAssembly/weak-alias.ll
  llvm/test/tools/llvm-nm/wasm/local-symbols.ll
  llvm/test/tools/llvm-objdump/WebAssembly/relocations.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58742.188634.patch
Type: text/x-patch
Size: 30561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190227/f36bbccd/attachment-0001.bin>


More information about the cfe-commits mailing list