Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix computeHostNumPhysicalCores() for Linux on POWER and Linux on Z
ThinLTO is run using a single thread on Linux on Power. The compute_thread_count() routine calls getHostNumPhysicalCores which returns -1 by default, and so `MaxThreadCount is set to 1. unsigned llvm::ThreadPoolStrategy::compute_thread_count() const { int MaxThreadCount = UseHyperThreads ? computeHostNumHardwareThreads() : sys::getHostNumPhysicalCores(); if (MaxThreadCount <= 0) MaxThreadCount = 1; … } Fix: provide custom implementation of getHostNumPhysicalCores for Linux on Power and Linux on Z. Reviewed By: Kai, uweigand Differential Revision: https://reviews.llvm.org/D84764
- Loading branch information