Skip to content

Commit 5bebd32

Browse files
bd1976brisc-rhodes
authored andcommitted
[DOC][DTLTO] Update DTLTO documentation for the LLVM 22 release (#177368)
This change updates the documentation to reflect work completed during the LLVM 22 timeframe, including support for the ThinLTO cache and static libraries/archives. It also clarifies that the goal of DTLTO is to support distribution of ThinLTO backend compilations for any in-process ThinLTO invocation. SIE Internal Tracker: TOOLCHAIN-21016 (cherry picked from commit 88478ab)
1 parent 279f407 commit 5bebd32

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

llvm/docs/DTLTO.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ here:
2424
Using the *separate thin-link* approach requires a build system capable of
2525
handling the dynamic dependencies specified in the individual summary index
2626
files, such as Bazel. DTLTO removes this requirement, allowing it to be used
27-
with any build process that supports in-process ThinLTO.
27+
with any build process that supports in-process ThinLTO. To facilitate this,
28+
DTLTO supports common in-process ThinLTO features, such as caching. Bitcode
29+
objects in static libraries/archives (e.g. libc.a) are also handled
30+
transparently by temporarily extracting referenced objects for distribution;
31+
when thin archives are used, no extraction is required.
2832

2933
The following commands show the steps used for the *separate thin-link*
3034
approach for a basic example:
@@ -66,7 +70,7 @@ such as the following can be used:
6670

6771
.. code-block:: console
6872
69-
clang -flto=thin -fuse-ld=lld -O2 t1.o t2.o -fthinlto-distributor=$(which python3) \
73+
clang -flto=thin -fuse-ld=lld -O2 t1.o t2.o libt3.a -fthinlto-distributor=$(which python3) \
7074
-Xthinlto-distributor=$LLVMSRC/llvm/utils/dtlto/local.py
7175
7276
Distributors
@@ -165,22 +169,22 @@ following backend compilation commands with maximum parallelism:
165169
/usr/bin/clang -O2 -c -fprofile-sample-use=my.prof t2.o -fthinlto-index=t2.o.thinlto.bc -o t2.native.o \
166170
-fproc-stat-report=t2.stats.txt
167171
168-
TODOs
169-
-----
172+
Limitations
173+
-----------
170174

171-
The following features are planned for DTLTO but not yet implemented:
175+
The following features are not implemented at this time:
172176

173-
- Support for the ThinLTO in-process cache.
174177
- Support for platforms other than ELF and COFF.
175-
- Support for archives with bitcode members.
176-
- Support for more LTO configurations; only a very limited set of LTO
177-
configurations is supported currently, e.g., support for basic block sections
178-
is not currently available.
178+
- Support for more CodeGen configurations in the LTO backend; only a very
179+
limited set is supported currently, e.g. support for basic block sections is
180+
not currently available.
181+
- Support for sharing ThinLTO cache entries with in-process ThinLTO entries.
182+
This is not currently supported because identical code generation is not yet
183+
guaranteed.
179184

180185
Constraints
181186
-----------
182187

183188
- Matching versions of Clang and LLD should be used.
184189
- The distributor used must support the JSON schema generated by the version of
185190
LLD in use.
186-

0 commit comments

Comments
 (0)