Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
141 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters