[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
Mon Jul 21 10:47:32 PDT 2025


johnno1962 wrote:

Minor changes after testing with other large links for clang and the Swift compiler. These are already plenty fast enough (1-5 seconds) but I wanted to be sure they were not made slower by using the -read-threads=20 option. I've moved the code around a bit but the only two functional changes were to introduce an arbitrary limit on the size of a buffer/file to try to page in. This was necessary as these two new test links involve few object files but very large archives when compared to the chrome link which I'd been optimising up to now. The other change was to avoid joining the background thread as much as possible so it would never slow down existing processing. This required popping the work queue only after the page-in task had completed (see the "shouldPop" variable). It seems to be working well now though something is up with CI at the moment. I reversed my commit and it still failed it so I don't think it's me and have checked in again.

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


More information about the llvm-commits mailing list