summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-10-04 20:35:05 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-10-04 20:35:05 +0000
commit0038dfa19d952f1a8588b0b6dac8402bb38d3c2c (patch)
tree308f383f090bb41344fc74e0a746b3fb1c0a079b
parent10712d9203a33e3465ea1c81be7c5f5d9bad57a2 (diff)
downloadbcm5719-llvm-0038dfa19d952f1a8588b0b6dac8402bb38d3c2c.tar.gz
bcm5719-llvm-0038dfa19d952f1a8588b0b6dac8402bb38d3c2c.zip
Revert "Revert r314810: Use sched_getaffinity instead of std::thread::hardware_concurrency."
This reverts commit r314924. The required llvm patch was recommitted. llvm-svn: 314933
-rw-r--r--lld/ELF/SyntheticSections.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index e850ed0d8a4..a07ac8c371e 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -2235,8 +2235,8 @@ void MergeNoTailSection::finalizeContents() {
// operations in the following tight loop.
size_t Concurrency = 1;
if (Config->Threads)
- if (int N = std::thread::hardware_concurrency())
- Concurrency = std::min<size_t>(PowerOf2Floor(N), NumShards);
+ Concurrency =
+ std::min<size_t>(PowerOf2Floor(hardware_concurrency()), NumShards);
// Add section pieces to the builders.
parallelForEachN(0, Concurrency, [&](size_t ThreadId) {
OpenPOWER on IntegriCloud