[PATCH] D68751: [lld][WebAssembly] Where possible handle signature mismatches via an adaptor function

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 17:54:19 PDT 2019


sbc100 created this revision.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, sunfish, aheejin, hiraditya, jgravelle-google, mehdi_amini, dschuff.
Herald added a project: LLVM.

This is similar to what we do at the bitcode level with the
WebAssemblyFixFunctionBitcasts pass but implemented at the object
file level.

Previously when we had caller and callee disagree about the function
signature we generated a warning replaced the call with a call to
a dummy function that contained only unreachable.

After this change we still generate the warning but will also then
try to generate an adapter function that will add or remove arguments
such that call can still possible succeed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68751

Files:
  lld/test/wasm/lto/signature-mismatch.ll
  lld/wasm/InputChunks.h
  lld/wasm/MarkLive.cpp
  lld/wasm/SymbolTable.cpp
  lld/wasm/SymbolTable.h
  lld/wasm/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68751.224220.patch
Type: text/x-patch
Size: 9299 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191010/2eb56c36/attachment.bin>


More information about the llvm-commits mailing list