[all-commits] [llvm/llvm-project] c0a922: Add parallelTransformReduce and parallelForEachError
Reid Kleckner via All-commits
all-commits at lists.llvm.org
Mon Nov 2 16:50:30 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c0a922b3db2d39f36c0c01776cce90cc160a7d62
https://github.com/llvm/llvm-project/commit/c0a922b3db2d39f36c0c01776cce90cc160a7d62
Author: Reid Kleckner <rnk at google.com>
Date: 2020-11-02 (Mon, 02 Nov 2020)
Changed paths:
M llvm/include/llvm/Support/Parallel.h
M llvm/unittests/Support/ParallelTest.cpp
Log Message:
-----------
Add parallelTransformReduce and parallelForEachError
parallelTransformReduce is modelled on the C++17 pstl API of
std::transform_reduce, except our wrappers do not use execution policy
parameters.
parallelForEachError allows loops that contain potentially failing
operations to propagate errors out of the loop. This was one of the
major challenges I encountered while parallelizing PDB type merging in
LLD. Parallelizing a loop with parallelForEachError is not behavior
preserving: the loop will no longer stop on the first error, it will
continue working and report all errors it encounters in a list.
I plan to use this to propagate errors out of LLD's
coff::TpiSource::remapTpiWithGHashes, which currently stores errors an
error in the TpiSource object.
Differential Revision: https://reviews.llvm.org/D90639
More information about the All-commits
mailing list