[PATCH] D42476: [WebAssembly] Symbol changes #4f: Don't duplicate functions in LLD table output

Nicholas Wilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 06:15:52 PST 2018


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

Previously, we were ensuring that the "output index" for InputFunctions was unique across all symbols that referenced a function body, but allowing the same function body to have multiple table indexes.

Now, we use the same mechanism for table indexes as we already do for output indexes, ensuring that each InputFunction is only placed in the table once.

This makes the LLD output table denser and smaller, but with identical behaviour.

Note that we still need the `Symbol::TableIndex` member, to store the table index for function Symbols that don't have an InputFunction, ie for address-taken imports.

Split out from https://reviews.llvm.org/D41955. Please merge after https://reviews.llvm.org/D42096 and before https://reviews.llvm.org/D41955, otherwise you'll have to update the tests to merge in another order.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D42476

Files:
  test/wasm/weak-alias.ll
  wasm/InputChunks.cpp
  wasm/InputChunks.h
  wasm/Symbols.cpp
  wasm/Symbols.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42476.131249.patch
Type: text/x-patch
Size: 5585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180124/3fde7853/attachment.bin>


More information about the llvm-commits mailing list