https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/178924

Backport 88478ab495f27f2cb798d4bf6912fe7cf4872997

Requested by: @bd1976bris

>From f9ea9c9d79dc3aee710f2c8f6c3d2e39b23810fe Mon Sep 17 00:00:00 2001
From: Ben Dunbobbin <[email protected]>
Date: Fri, 30 Jan 2026 16:17:20 +0000
Subject: [PATCH] [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 88478ab495f27f2cb798d4bf6912fe7cf4872997)
---
 llvm/docs/DTLTO.rst | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/llvm/docs/DTLTO.rst b/llvm/docs/DTLTO.rst
index 70e26efed897e..c4df0e15977ef 100644
--- a/llvm/docs/DTLTO.rst
+++ b/llvm/docs/DTLTO.rst
@@ -24,7 +24,11 @@ here:
 Using the *separate thin-link* approach requires a build system capable of
 handling the dynamic dependencies specified in the individual summary index
 files, such as Bazel. DTLTO removes this requirement, allowing it to be used
-with any build process that supports in-process ThinLTO.
+with any build process that supports in-process ThinLTO. To facilitate this,
+DTLTO supports common in-process ThinLTO features, such as caching. Bitcode
+objects in static libraries/archives (e.g. libc.a) are also handled
+transparently by temporarily extracting referenced objects for distribution;
+when thin archives are used, no extraction is required.
 
 The following commands show the steps used for the *separate thin-link*
 approach for a basic example:
@@ -66,7 +70,7 @@ such as the following can be used:
 
 .. code-block:: console
 
-   clang -flto=thin -fuse-ld=lld -O2 t1.o t2.o -fthinlto-distributor=$(which 
python3) \
+   clang -flto=thin -fuse-ld=lld -O2 t1.o t2.o libt3.a 
-fthinlto-distributor=$(which python3) \
      -Xthinlto-distributor=$LLVMSRC/llvm/utils/dtlto/local.py
 
 Distributors
@@ -165,17 +169,18 @@ following backend compilation commands with maximum 
parallelism:
     /usr/bin/clang -O2 -c -fprofile-sample-use=my.prof t2.o  
-fthinlto-index=t2.o.thinlto.bc -o t2.native.o \
       -fproc-stat-report=t2.stats.txt
 
-TODOs
------
+Limitations
+-----------
 
-The following features are planned for DTLTO but not yet implemented:
+The following features are not implemented at this time:
 
-- Support for the ThinLTO in-process cache.
 - Support for platforms other than ELF and COFF.
-- Support for archives with bitcode members.
-- Support for more LTO configurations; only a very limited set of LTO
-  configurations is supported currently, e.g., support for basic block sections
-  is not currently available.
+- Support for more CodeGen configurations in the LTO backend; only a very
+  limited set is supported currently, e.g. support for basic block sections is
+  not currently available.
+- Support for sharing ThinLTO cache entries with in-process ThinLTO entries.
+  This is not currently supported because identical code generation is not yet
+  guaranteed.
 
 Constraints
 -----------
@@ -183,4 +188,3 @@ Constraints
 - Matching versions of Clang and LLD should be used.
 - The distributor used must support the JSON schema generated by the version of
   LLD in use.
-

_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to