[lld] [lld][MachO]Multi-threaded i/o. Twice as fast linking a large project. (PR #147134)

John Holdsworth via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 12 05:14:53 PDT 2025


================
@@ -1295,6 +1394,27 @@ static void createFiles(const InputArgList &args) {
       break;
     }
   }
+
+  if (config->readThreads) {
+    multiThreadedPageIn(deferredFiles);
+
+    DeferredFiles archiveContents;
+    std::vector<ArchiveFile *> archives;
+    for (auto &file : deferredFiles)
+      if (ArchiveFile *archive = dyn_cast<ArchiveFile>(
+              processFile(file.buffer, &archiveContents, file.path,
+                          LoadType::CommandLine, file.isLazy)))
+        archives.push_back(archive);
----------------
johnno1962 wrote:

I agree! I didn't want to use an extra curly brace as I know they slow code down ;)

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


More information about the llvm-commits mailing list