[PATCH] D70447: [Support] ThreadPoolExecutor fixes for Windows/MinGW
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 16 17:40:23 PST 2019
MaskRay added a comment.
> Right now LLD is the only client, but this code is in Support, so it should be general. I see that it is not used by the rest of LLVM. Perhaps it should be moved back to LLD Core, so that we can make such assumptions about process lifetime.
lld/Common/Threads.h <https://github.com/llvm/llvm-project/blob/master/lld/include/lld/Common/Threads.h> is the only user of llvm/Support/Parallel.h <https://github.com/llvm/llvm-project/blob/master/llvm/include/llvm/Support/Parallel.h>. parallelForEach and parallelSort in lld do not take a context parameter, and hence the implementation of llvm/Support/Parallel.h uses a function-local static variable. If we can add a context parameter (`llvm::ThreadPool`), we may be able to make llvm/Support/Parallel.h more general and probably re-implement it on top of lib/Support/ThreadPool.cpp . If we can achieve that goal, do we still need to move the parallel utilities to lld?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70447/new/
https://reviews.llvm.org/D70447
More information about the llvm-commits
mailing list