[PATCH] D69582: Let clang driver support parallel jobs

2020-02-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/Compilation.cpp:332 +if (!Next) { + std::this_thread::yield(); continue; aganea wrote: > yaxunl wrote: > > aganea wrote: > > > In addition to what

[PATCH] D69582: Let clang driver support parallel jobs

2020-02-05 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added inline comments. Comment at: clang/lib/Driver/Compilation.cpp:332 +if (!Next) { + std::this_thread::yield(); continue; yaxunl wrote: > aganea wrote: > > In addition to what @thakis said above, yielding here is maybe not a good > > id

[PATCH] D69582: Let clang driver support parallel jobs

2020-02-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/Compilation.cpp:332 +if (!Next) { + std::this_thread::yield(); continue; aganea wrote: > In addition to what @thakis said above, yielding here is m

[PATCH] D69582: Let clang driver support parallel jobs

2019-12-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 232405. yaxunl added a comment. split the patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69582/new/ https://reviews.llvm.org/D69582 Files: clang/include/clang/Driver/Driver.h clang/include/clang/Driver/Job.h clang/include/clang/Driver/Opt

[PATCH] D69582: Let clang driver support parallel jobs

2019-10-31 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. This is somehow similar to what I was proposing in D52193 . Would you possibly provide tests and/or an example of your usage please? Comment at: clang/lib/Driver/Compilation.cpp:303 +} +std::thread Th(Work); +

[PATCH] D69582: Let clang driver support parallel jobs

2019-10-30 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/lib/Driver/Compilation.cpp:303 +} +std::thread Th(Work); +Th.detach(); Maybe a select() / fork() loop is a better approach than spawning one thread per subprocess? This is doing thread-level parallelism

[PATCH] D69582: Let clang driver support parallel jobs

2019-10-30 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: aganea, amccarth, rnk. rnk added a comment. +@aganea @amccarth Users have been asking for /MP support in clang-cl for a while, which is basically this. Is there anything in JobScheduler that could reasonably be moved down to llvm/lib/Support? I would also like to be able

[PATCH] D69582: Let clang driver support parallel jobs

2019-10-29 Thread Artem Belevich via Phabricator via cfe-commits
tra added a reviewer: echristo. tra added a subscriber: echristo. tra added a comment. @echristo Eric, any thoughts/concerns on the overall direction for the driver? @yaxunl One concern I have is diagnostics. When the jobs are executed in parallel, I assume all of them will go to the standard er

[PATCH] D69582: Let clang driver support parallel jobs

2019-10-29 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rsmith, rjmccall. Herald added subscribers: jfb, mgorny. It is observed that device code compilation takes most of the compilation time when clang compiles CUDA/HIP programs since device code usually contains complicated computation code.