forked from OSchip/llvm-project
Improve comments after 8404aeb56a
.
This commit is contained in:
parent
89ab5c69c8
commit
6f846c8504
|
@ -43,7 +43,7 @@ public:
|
|||
/// Construct a pool using the hardware strategy \p S for mapping hardware
|
||||
/// execution resources (threads, cores, CPUs)
|
||||
/// Defaults to using the maximum execution resources in the system, but
|
||||
/// excluding any resources contained in the affinity mask.
|
||||
/// accounting for the affinity mask.
|
||||
ThreadPool(ThreadPoolStrategy S = hardware_concurrency());
|
||||
|
||||
/// Blocking destructor: the pool will wait for all the threads to complete.
|
||||
|
|
|
@ -148,8 +148,9 @@ void llvm_execute_on_thread_async(
|
|||
class ThreadPoolStrategy {
|
||||
public:
|
||||
// The default value (0) means all available threads should be used,
|
||||
// excluding affinity mask. If set, this value only represents a suggested
|
||||
// high bound, the runtime might choose a lower value (not higher).
|
||||
// taking the affinity mask into account. If set, this value only represents
|
||||
// a suggested high bound, the runtime might choose a lower value (not
|
||||
// higher).
|
||||
unsigned ThreadsRequested = 0;
|
||||
|
||||
// If SMT is active, use hyper threads. If false, there will be only one
|
||||
|
@ -172,7 +173,7 @@ void llvm_execute_on_thread_async(
|
|||
/// be less efficient. Avoid this strategy if doing lots of I/O. Currently
|
||||
/// based on physical cores, if available for the host system, otherwise falls
|
||||
/// back to hardware_concurrency(). Returns 1 when LLVM is configured with
|
||||
/// LLVM_ENABLE_THREADS = OFF
|
||||
/// LLVM_ENABLE_THREADS = OFF.
|
||||
inline ThreadPoolStrategy
|
||||
heavyweight_hardware_concurrency(unsigned ThreadCount = 0) {
|
||||
ThreadPoolStrategy S;
|
||||
|
@ -219,7 +220,7 @@ void llvm_execute_on_thread_async(
|
|||
|
||||
/// Returns a mask that represents on which hardware thread, core, CPU, NUMA
|
||||
/// group, the calling thread can be executed. On Windows, threads cannot
|
||||
/// cross CPU boundaries.
|
||||
/// cross CPU sockets boundaries.
|
||||
llvm::BitVector get_thread_affinity_mask();
|
||||
|
||||
/// Returns how many physical CPUs or NUMA groups the system has.
|
||||
|
|
|
@ -80,7 +80,9 @@ extern cl::opt<std::string> RemarksFormat;
|
|||
|
||||
namespace {
|
||||
|
||||
// Default to using one job per hardware core in the system
|
||||
// Default to using all available threads in the system, but using only one
|
||||
// thred per core, as indicated by the usage of
|
||||
// heavyweight_hardware_concurrency() below.
|
||||
static cl::opt<int> ThreadCount("threads", cl::init(0));
|
||||
|
||||
// Simple helper to save temporary files for debug.
|
||||
|
|
|
@ -65,7 +65,9 @@ static cl::opt<bool>
|
|||
"import files for the "
|
||||
"distributed backend case"));
|
||||
|
||||
// Default to using all hardware cores in the system.
|
||||
// Default to using all available threads in the system, but using only one
|
||||
// thread per core, as indicated by the usage of
|
||||
// heavyweight_hardware_concurrency() in the InProcessThinBackend constructor.
|
||||
static cl::opt<int> Threads("thinlto-threads", cl::init(0));
|
||||
|
||||
static cl::list<std::string> SymbolResolutions(
|
||||
|
|
Loading…
Reference in New Issue