[llvm] Make WriteIndexesThinBackend multi threaded (PR #109847)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 16:09:32 PDT 2024
================
@@ -1622,7 +1618,8 @@ class WriteIndexesThinBackend : public ThinBackendProc {
std::string NativeObjectPrefix, bool ShouldEmitImportsFiles,
raw_fd_ostream *LinkedObjectsFile, lto::IndexWriteCallback OnWrite)
: ThinBackendProc(Conf, CombinedIndex, ModuleToDefinedGVSummaries,
- OnWrite, ShouldEmitImportsFiles),
+ OnWrite, ShouldEmitImportsFiles,
+ /* ThinLTOParallelism */ hardware_concurrency()),
----------------
teresajohnson wrote:
We should make this adjustable by the user, who may not want to use the full hardware_concurrency. I realized this when testing, because I had no easy way of passing in different parallelism values. Can you hook this up the same way it is for the in process backend, and have e.g. lld pass in the same parameter to this backend as it does for that?
https://github.com/llvm/llvm-project/pull/109847
More information about the llvm-commits
mailing list