llvm-project/lld/docs
Peter Collingbourne 4f9527065c ELF: New symbol table design.
This patch implements a new design for the symbol table that stores
SymbolBodies within a memory region of the Symbol object. Symbols are mutated
by constructing SymbolBodies in place over existing SymbolBodies, rather
than by mutating pointers. As mentioned in the initial proposal [1], this
memory layout helps reduce the cache miss rate by improving memory locality.

Performance numbers:

           old(s) new(s)
Without debug info:
chrome      7.178  6.432 (-11.5%)
LLVMgold.so 0.505  0.502 (-0.5%)
clang       0.954  0.827 (-15.4%)
llvm-as     0.052  0.045 (-15.5%)
With debug info:
scylla      5.695  5.613 (-1.5%)
clang      14.396 14.143 (-1.8%)

Performance counter results show that the fewer required indirections is
indeed the cause of the improved performance. For example, when linking
chrome, stalled cycles decreases from 14,556,444,002 to 12,959,238,310, and
instructions per cycle increases from 0.78 to 0.83. We are also executing
many fewer instructions (15,516,401,933 down to 15,002,434,310), probably
because we spend less time allocating SymbolBodies.

The new mechanism by which symbols are added to the symbol table is by calling
add* functions on the SymbolTable.

In this patch, I handle local symbols by storing them inside "unparented"
SymbolBodies. This is suboptimal, but if we do want to try to avoid allocating
these SymbolBodies, we can probably do that separately.

I also removed a few members from the SymbolBody class that were only being
used to pass information from the input file to the symbol table.

This patch implements the new design for the ELF linker only. I intend to
prepare a similar patch for the COFF linker.

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-April/098832.html

Differential Revision: http://reviews.llvm.org/D19752

llvm-svn: 268178
2016-05-01 04:55:03 +00:00
..
_static
_templates
llvm-theme Fix trailing whitespace. 2014-01-27 03:09:26 +00:00
AtomLLD.rst Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
C++11.rst Fix a typo spotted by Anton. 2014-03-02 13:00:23 +00:00
CMakeLists.txt Add support for building Sphinx documentation when being built inside LLVM source tree and using CMake. 2014-04-18 21:59:05 +00:00
Driver.rst Fix trailing whitespace. 2014-01-27 03:09:26 +00:00
NewLLD.rst ELF: New symbol table design. 2016-05-01 04:55:03 +00:00
README.txt
Readers.rst Remove the Native file format. 2015-04-10 21:23:51 +00:00
ReleaseNotes.rst Start adding release notes for lld. 2016-02-16 13:12:55 +00:00
conf.py Docs: keep copyright years up-to-date. 2016-03-30 22:25:04 +00:00
design.rst Delete more ELF bits from the old linker. 2016-02-28 16:03:37 +00:00
development.rst [lld] Fix typo in document. 2013-05-11 00:26:26 +00:00
getting_started.rst getting_started.rst: fix 'unknown target name' error 2016-01-27 17:54:35 +00:00
hello.png
index.rst Update the documents of the new LLD. 2016-03-12 06:06:40 +00:00
make.bat
open_projects.rst Remove links to deleted TODOs. 2016-04-16 11:11:56 +00:00
sphinx_intro.rst Spelling and grammar corrections. 2013-02-03 07:05:26 +00:00
windows_support.rst COFF: Update windows_support.html. 2015-09-03 17:01:18 +00:00

README.txt

lld Documentation
=================

The lld documentation is written using the Sphinx documentation generator. It is
currently tested with Sphinx 1.1.3.

We currently use the 'nature' theme and a Beaker inspired structure.

To rebuild documents into html:

   [/lld/docs]> make html