[PATCH] D65783: [WebAssembly] Initialize memory in start function

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 17:46:53 PDT 2019


tlively created this revision.
tlively added reviewers: sbc100, aheejin.
Herald added subscribers: llvm-commits, jfb, sunfish, jgravelle-google, dschuff.
Herald added a project: LLVM.

- `__wasm_init_memory` is now the WebAssembly start function instead of being called from `__wasm_call_ctors` or called directly by the runtime.
- Adds a new synthetic data symbol `__wasm_init_memory_flag` that is atomically incremented from zero to one by the thread responsible for initializing memory.
- All threads now unconditionally perform data.drop on all passive segments.
- Removes --passive-segments and --active-segments flags and controls segment type based on --shared-memory instead. The deleted flags were only present to ameliorate the upgrade path in Emscripten.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65783

Files:
  lld/test/wasm/data-layout.ll
  lld/test/wasm/data-segment-merging.ll
  lld/test/wasm/data-segments.ll
  lld/test/wasm/import-memory.test
  lld/test/wasm/no-tls.test
  lld/test/wasm/shared-memory.yaml
  lld/test/wasm/tls-align.ll
  lld/test/wasm/tls.ll
  lld/wasm/Config.h
  lld/wasm/Driver.cpp
  lld/wasm/MarkLive.cpp
  lld/wasm/Options.td
  lld/wasm/Symbols.cpp
  lld/wasm/Symbols.h
  lld/wasm/SyntheticSections.cpp
  lld/wasm/SyntheticSections.h
  lld/wasm/Writer.cpp
  llvm/include/llvm/BinaryFormat/Wasm.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65783.213504.patch
Type: text/x-patch
Size: 29155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190806/14b876f7/attachment-0001.bin>


More information about the llvm-commits mailing list