[PATCH] D52193: RFC: [clang] Multithreaded compilation support -- NOT FOR SUBMIT

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 19:29:42 PST 2020


aganea added a comment.

Hi @tycho ! Sorry for not getting back earlier.
I implemented an alternate approach last year, which proved to be better (in terms of build times) than what I proposed in this demo patch. That is, using a thread pool instead of the process pool as implemented here. This makes compilation with /MP considerably faster, and allows for neat optimizations like file caching, re-using allocated memory pages, and possibly other things down the line. But before getting there, it requires somehow making `cl::opt` and the `CommandLineParser` thread-safe, thus revive this RFC thread <http://lists.llvm.org/pipermail/llvm-dev/2018-October/127039.html>. In essence, we want a mode where `cl::opt`s have their data optionally stored in a stack context, so that we can safely call a CC1Command <https://github.com/llvm/llvm-project/blob/b4a99a061f517e60985667e39519f60186cbb469/clang/lib/Driver/Job.cpp#L402> in each thread. I'll write a proposal to revive the RFC.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D52193/new/

https://reviews.llvm.org/D52193





More information about the llvm-commits mailing list