llvm-project/lld/Common
Reid Kleckner 932f0276ea [Support] Move LLD's parallel algorithm wrappers to support
Essentially takes the lld/Common/Threads.h wrappers and moves them to
the llvm/Support/Paralle.h algorithm header.

The changes are:
- Remove policy parameter, since all clients use `par`.
- Rename the methods to `parallelSort` etc to match LLVM style, since
  they are no longer C++17 pstl compatible.
- Move algorithms from llvm::parallel:: to llvm::, since they have
  "parallel" in the name and are no longer overloads of the regular
  algorithms.
- Add range overloads
- Use the sequential algorithm directly when 1 thread is requested
  (skips task grouping)
- Fix the index type of parallelForEachN to size_t. Nobody in LLVM was
  using any other parameter, and it made overload resolution hard for
  for_each_n(par, 0, foo.size(), ...) because 0 is int, not size_t.

Remove Threads.h and update LLD for that.

This is a prerequisite for parallel public symbol processing in the PDB
library, which is in LLVM.

Reviewed By: MaskRay, aganea

Differential Revision: https://reviews.llvm.org/D79390
2020-05-05 15:21:05 -07:00
..
Args.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
CMakeLists.txt [lld][COFF][ELF][WebAssembly] Replace --[no-]threads /threads[:no] with --threads={1,2,...} /threads:{1,2,...} 2020-03-31 08:46:12 -07:00
DWARF.cpp [LLD] Move duplicated dwarf parsing code to the Common library. NFC. 2019-10-21 08:01:52 +00:00
ErrorHandler.cpp [Support] Move LLD's parallel algorithm wrappers to support 2020-05-05 15:21:05 -07:00
Filesystem.cpp [Support] Move LLD's parallel algorithm wrappers to support 2020-05-05 15:21:05 -07:00
Memory.cpp [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Reproduce.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Strings.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
TargetOptionsCommandFlags.cpp Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime registration 2020-03-17 14:01:30 +01:00
Timer.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Version.cpp Update `ld.lld --version` string for monorepo. 2019-02-21 18:37:26 +00:00