[PATCH] D121420: [lld][WebAssembly] Take advantage of extended const expression when available

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 15:18:07 PST 2022


sbc100 created this revision.
Herald added subscribers: wingo, ecnelises, sunfish, jgravelle-google, dschuff.
Herald added a project: All.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, aheejin.
Herald added a project: LLVM.

In particular, when extended-const is available and we building PIC
code we no longer need to combine output segments into a single segment
that can be initialized at `__memory_base`.  Instead each segment
can encode its offset from `__memory_base` in its initializer.  e.g.

  (i32.add (global.get __memory_base) (i32.const offset)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121420

Files:
  lld/test/wasm/tls-non-shared-memory.s
  lld/wasm/Config.h
  lld/wasm/OutputSections.cpp
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121420.414512.patch
Type: text/x-patch
Size: 7259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220310/5f61165d/attachment.bin>


More information about the llvm-commits mailing list