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:
Rui Ueyama 2017-10-04 18:39:51 +00:00
parent d40e03c2d8
commit 61b9ce217a
1 changed files with 2 additions and 2 deletions

View File

@ -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) {