[ThinLTO] Default backend threads to heavyweight_hardware_concurrency
authorTeresa Johnson <tejohnson@google.com>
Wed, 19 Oct 2016 17:35:01 +0000 (17:35 +0000)
committerTeresa Johnson <tejohnson@google.com>
Wed, 19 Oct 2016 17:35:01 +0000 (17:35 +0000)
commitec544c552ed63cc0e21ccddf342023084c9b904f
tree41b3cceb5a8f43a6b7849deb5b3c0825bbf335f4
parent69d7cf0d41cc7e41967c16aab471bf9db71ed468
[ThinLTO] Default backend threads to heavyweight_hardware_concurrency

Summary:
Changes default backend parallelism from thread::hardware_concurrency to
the new llvm::heavyweight_hardware_concurrency, which for X86 Linux
defaults to the number of physical cores (and will fall back to
thread::hardware_concurrency otherwise). This avoid oversubscribing
the physical cores using hyperthreading.

Reviewers: mehdi_amini, pcc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D25775

llvm-svn: 284618
llvm/lib/LTO/LTO.cpp
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
llvm/tools/gold/gold-plugin.cpp
llvm/tools/llvm-lto2/llvm-lto2.cpp