[PATCH] D68965: [WebAssembly] Elide data segments for .bss sections

Thomas Lively via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 18:04:57 PDT 2019


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

WebAssembly memories are zero-initialized, so when module does not
import its memory initializing .bss sections is guaranteed to be a
no-op. To reduce binary size and initialization time, .bss sections
are simply not emitted into the final binary unless the memory is
imported.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68965

Files:
  lld/test/wasm/Inputs/locals-duplicate1.ll
  lld/test/wasm/Inputs/locals-duplicate2.ll
  lld/test/wasm/bss-only.ll
  lld/test/wasm/custom-section-name.ll
  lld/test/wasm/data-layout.ll
  lld/test/wasm/data-segments.ll
  lld/test/wasm/locals-duplicate.test
  lld/wasm/OutputSections.cpp
  lld/wasm/OutputSections.h
  lld/wasm/OutputSegment.h
  lld/wasm/SyntheticSections.cpp
  lld/wasm/SyntheticSections.h
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68965.224942.patch
Type: text/x-patch
Size: 14633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191015/04b9159e/attachment.bin>


More information about the llvm-commits mailing list