[all-commits] [llvm/llvm-project] f18fd6: [lld-macho] Use parallel algorithms in favor of `T...
Daniel Bertalan via All-commits
all-commits at lists.llvm.org
Sun Jul 21 23:13:28 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f18fd6e3f9c38560bc26253cae77ac3935149602
https://github.com/llvm/llvm-project/commit/f18fd6e3f9c38560bc26253cae77ac3935149602
Author: Daniel Bertalan <dani at danielbertalan.dev>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M lld/MachO/Writer.cpp
Log Message:
-----------
[lld-macho] Use parallel algorithms in favor of `ThreadPool` (#99471)
In https://reviews.llvm.org/D115416, it was decided that an explicit
thread pool should be used instead of the simpler fork-join model of the
`parallelFor*` family of functions. Since then, more parallelism has
been added to LLD, but these changes always used the latter strategy,
similarly to other ports of LLD.
This meant that we ended up spawning twice the requested amount of
threads; one set for the `llvm/Support/Parallel.h` executor, and one for
the thread pool.
Since that decision, 3b4d800911 has landed, which allows us to
explicitly enqueue jobs on the executor pool of the parallel algorithms,
which should be enough to achieve sharded output writing and
parallelized input file parsing. Now only the construction of the map
file is left that should be done *concurrently* with different linking
steps, this commit proposes explicitly spawning a dedicated worker
thread for it.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list