[PATCH] D140111: [lld][wasm] Split __wasm_apply_data_relocs when it exceeds the function size limit

Illia Malachyn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 10:45:59 PST 2022


k1nder10 updated this revision to Diff 483237.
k1nder10 added a comment.

[lld][wasm] Split __wasm_apply_data_relocs when it exceeds the function size limit

__wasm_apply_data_relocs can grow drastically exceeding the function size limit.
This change introduces __wasm_apply_data_relocs_tail function which is supposed
to include instructions that caused the limit hit. __wasm_apply_data_relocs
calls __wasm_apply_data_relocs_tail at the end of the function body.
__wasm_apply_data_relocs_tail is empty if wasm module doesn't hit the function
size limit.

discussed here:
https://github.com/llvm/llvm-project/issues/55608
https://github.com/emscripten-core/emscripten/discussions/17374


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140111/new/

https://reviews.llvm.org/D140111

Files:
  lld/wasm/CMakeLists.txt
  lld/wasm/Config.h
  lld/wasm/Driver.cpp
  lld/wasm/FunctionSplitter.h
  lld/wasm/SplitApplyDataRelocsStrategy.cpp
  lld/wasm/SplitApplyDataRelocsStrategy.h
  lld/wasm/SplitStrategy.h
  lld/wasm/Symbols.cpp
  lld/wasm/Symbols.h
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140111.483237.patch
Type: text/x-patch
Size: 9754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/63af2653/attachment.bin>


More information about the llvm-commits mailing list