[PATCH] D70447: [Support] ThreadPoolExecutor fixes for Windows/MinGW

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 05:51:40 PST 2019


andrewng added a comment.

In D70447#1787132 <https://reviews.llvm.org/D70447#1787132>, @MaskRay wrote:

> 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?


I think the lack of a context parameter was deliberate to closer mimic the C++17 execution policies feature.


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

https://reviews.llvm.org/D70447





More information about the llvm-commits mailing list