[PATCH] D79390: [Support] Sink LLD's parallel algorithm wrappers to support
Alexandre Ganea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 06:25:55 PDT 2020
aganea added a comment.
> This is a prerequisite for parallel public symbol processing in the PDB
> library, which is in LLVM.
Thanks for working on this Reid :-)
================
Comment at: lld/COFF/LLDMapFile.cpp:77
std::vector<std::string> str(syms.size());
- parallelForEachN((size_t)0, syms.size(), [&](size_t i) {
+ parallel::for_each_n(parallel::par, (size_t)0, syms.size(), [&](size_t i) {
raw_string_ostream os(str[i]);
----------------
MaskRay wrote:
> Isn't `parallel::par` redundant? Can we just use
>
> `parallel::for_each_n((size_t)0, syms.size(), [&](size_t i) { ... })` ?
+1
================
Comment at: lld/ELF/Writer.cpp:1752
for (InputFile *File : objectFiles) {
- parallelForEach(File->getSymbols(), [&](Symbol *Sym) {
+ parallel::for_each(parallel::par, File->getSymbols(), [&](Symbol *Sym) {
auto *def = dyn_cast<Defined>(Sym);
----------------
`sym`, as indicated by the clang-tidy log.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79390/new/
https://reviews.llvm.org/D79390
More information about the llvm-commits
mailing list