forked from OSchip/llvm-project
Revert r314810: Use sched_getaffinity instead of std:🧵:hardware_concurrency.
This reverts commit r314810 because r314809 was reverted. llvm-svn: 314924
This commit is contained in:
parent
d40e03c2d8
commit
61b9ce217a
|
@ -2235,8 +2235,8 @@ void MergeNoTailSection::finalizeContents() {
|
|||
// operations in the following tight loop.
|
||||
size_t Concurrency = 1;
|
||||
if (Config->Threads)
|
||||
Concurrency =
|
||||
std::min<size_t>(PowerOf2Floor(hardware_concurrency()), NumShards);
|
||||
if (int N = std::thread::hardware_concurrency())
|
||||
Concurrency = std::min<size_t>(PowerOf2Floor(N), NumShards);
|
||||
|
||||
// Add section pieces to the builders.
|
||||
parallelForEachN(0, Concurrency, [&](size_t ThreadId) {
|
||||
|
|
Loading…
Reference in New Issue