llvm-project/lld/wasm
Sam Clegg 67abf53961 [WebAssembly] Don't duplicate functions in table output
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 should
not change the behaviour.

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

Patch by Nicholas Wilson!

Differential Revision: https://reviews.llvm.org/D42476

llvm-svn: 323379
2018-01-24 21:45:25 +00:00
..
CMakeLists.txt [WebAssembly] Add InputChunk as common base class for InputSegment and InputFunction. NFC. 2018-01-10 01:13:34 +00:00
Config.h [WebAssembly] Remove --emit-relocs 2018-01-22 21:55:43 +00:00
Driver.cpp [WebAssembly] Remove --emit-relocs 2018-01-22 21:55:43 +00:00
InputChunks.cpp [WebAssembly] Don't duplicate functions in table output 2018-01-24 21:45:25 +00:00
InputChunks.h [WebAssembly] Don't duplicate functions in table output 2018-01-24 21:45:25 +00:00
InputFiles.cpp [WebAssembly] Update to match llvm changes to TABLE relocations 2018-01-23 01:25:56 +00:00
InputFiles.h [WebAssembly] Update to match llvm changes to TABLE relocations 2018-01-23 01:25:56 +00:00
Options.td [WebAssembly] Remove --emit-relocs 2018-01-22 21:55:43 +00:00
OutputSections.cpp [WebAssembly] Move relocation handling InputChunks.cpp 2018-01-10 19:22:42 +00:00
OutputSections.h [WebAssembly] Add InputChunk as common base class for InputSegment and InputFunction. NFC. 2018-01-10 01:13:34 +00:00
OutputSegment.h Revert "[WebAssembly] Move checking of InputSegment comdat group earlier" 2018-01-13 15:57:48 +00:00
SymbolTable.cpp [WebAssembly] Remove special handling of entry point export. 2018-01-20 01:44:45 +00:00
SymbolTable.h [WebAssembly] Add COMDAT support 2018-01-12 22:25:17 +00:00
Symbols.cpp [WebAssembly] Don't duplicate functions in table output 2018-01-24 21:45:25 +00:00
Symbols.h [WebAssembly] Don't duplicate functions in table output 2018-01-24 21:45:25 +00:00
Writer.cpp [WebAssembly] Always start table index at 1, even for relocatable output 2018-01-24 21:37:30 +00:00
Writer.h
WriterUtils.cpp [WebAssembly] Allow function signature checking at link time 2017-11-30 01:40:08 +00:00
WriterUtils.h [WebAssembly] Allow function signature checking at link time 2017-11-30 01:40:08 +00:00