llvm-capstone/lld/docs
spupyrev 904b3f66f5 [ELF] A new code layout algorithm for function reordering [3a/3]
We are brining a new algorithm for function layout (reordering) based on the
call graph (extracted from a profile data). The algorithm is an improvement of
top of a known heuristic, C^3. It tries to co-locate hot and frequently executed
together functions in the resulting ordering. Unlike C^3, it explores a larger
search space and have an objective closely tied to the performance of
instruction and i-TLB caches. Hence, the name CDS = Cache-Directed Sort.
The algorithm can be used at the linking or post-linking (e.g., BOLT) stage.
Refer to https://reviews.llvm.org/D152834 for the actual implementation of the
reordering algorithm.

This diff adds a linker option to replace the existing C^3 heuristic with CDS.
The new behavior can be turned on by passing "--use-cache-directed-sort".
(the plan is to make it default in a next diff)

**Perf-impact**
clang-10 binary (built with LTO+AutoFDO/CSSPGO): wins on top of C^3 in [0.3%..0.8%]
rocksDB-8 binary (built with LTO+CSSPGO): wins on top of C^3 in [0.8%..1.5%]

Note that function layout affects the perf the most on older machines (with
smaller instruction/iTLB caches) and when huge pages are not enabled. The impact
on newer processors with huge pages enabled is likely neutral/minor.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D152840
2023-09-26 06:24:34 -07:00
..
_static
_templates [lld][docs] Update _templates/indexsidebar.html after Bugzilla->GitHub issue migration 2021-12-30 13:34:45 -08:00
ELF [ELF] Align the end of PT_GNU_RELRO associated PT_LOAD to a common-page-size boundary (#66042) 2023-09-14 10:33:11 -07:00
llvm-theme
MachO [lld] fix comment typos to cycle bots 2023-02-04 15:23:30 -05:00
CMakeLists.txt
conf.py [NFC][Py Reformat] Reformat python files in the rest of the dirs 2023-05-25 11:17:05 +02:00
error_handling_script.rst
hello.png
index.rst [lld][ELF] Support LoongArch 2023-07-25 17:06:07 +08:00
ld.lld.1 [ELF] A new code layout algorithm for function reordering [3a/3] 2023-09-26 06:24:34 -07:00
make.bat
missingkeyfunction.rst
NewLLD.rst Re-land [LLD] Allow usage of LLD as a library 2023-06-19 07:35:11 -04:00
partitions.dot
Partitions.rst
partitions.svg
README.txt
ReleaseNotes.rst Fix lld Sphinx build 2023-09-15 15:15:52 -04:00
WebAssembly.rst [lld][WebAssembly] Initial support for stub libraries 2023-03-23 14:26:27 -07:00
windows_support.rst

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.

See sphinx_intro.rst for more details.