[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 14:13:09 PST 2025


================
@@ -116,7 +117,18 @@ BitcodeCompiler::BitcodeCompiler(COFFLinkerContext &c) : ctx(c) {
 
   // Initialize ltoObj.
   lto::ThinBackend backend;
-  if (ctx.config.thinLTOIndexOnly) {
+  if (!ctx.config.DTLTODistributor.empty()) {
+    StringRef version = getenv("LLD_VERSION"); // For testing only.
+    if (version.empty())
+      version = ctx.saver.save(getLLDVersion());
+    backend = lto::createOutOfProcessThinBackend(
----------------
bd1976bris wrote:

Thanks. It may be unnecessary. https://github.com/llvm/llvm-project/commit/2edd897a4227e481af33e8e43090ab088cd9d953 implies that the summary index and import list generation can be expensive though which is why this setting is provided. Also some distribution systems have a mechanism to limit how many processes they launch concurrently on the local machine - we could pass the parallelization level to the distributors (by adding it to the JSON) so that this setting may be applied by the distributor?

https://github.com/llvm/llvm-project/pull/126654


More information about the cfe-commits mailing list