summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/Support/Threading.h8
-rw-r--r--llvm/lib/Support/Threading.cpp2
-rw-r--r--llvm/unittests/Support/Threading.cpp2
3 files changed, 7 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/Threading.h b/llvm/include/llvm/Support/Threading.h
index 8c9c0da3e92..0e9b88e69fb 100644
--- a/llvm/include/llvm/Support/Threading.h
+++ b/llvm/include/llvm/Support/Threading.h
@@ -116,10 +116,12 @@ namespace llvm {
#endif
}
- /// Get the amount of currency based on physical cores, if available for the
- /// host system, otherwise falls back to thread::hardware_concurrency().
+ /// Get the amount of currency to use for tasks requiring significant
+ /// memory or other resources. Currently based on physical cores, if
+ /// available for the host system, otherwise falls back to
+ /// thread::hardware_concurrency().
/// Returns 1 when LLVM is configured with LLVM_ENABLE_THREADS=OFF
- unsigned hardware_physical_concurrency();
+ unsigned heavyweight_hardware_concurrency();
}
#endif
diff --git a/llvm/lib/Support/Threading.cpp b/llvm/lib/Support/Threading.cpp
index fd303afbb91..760f9e2c388 100644
--- a/llvm/lib/Support/Threading.cpp
+++ b/llvm/lib/Support/Threading.cpp
@@ -118,7 +118,7 @@ void llvm::llvm_execute_on_thread(void (*Fn)(void*), void *UserData,
#endif
-unsigned llvm::hardware_physical_concurrency() {
+unsigned llvm::heavyweight_hardware_concurrency() {
#if !LLVM_ENABLE_THREADS
return 1;
#endif
diff --git a/llvm/unittests/Support/Threading.cpp b/llvm/unittests/Support/Threading.cpp
index 30a3c741b35..be53026415d 100644
--- a/llvm/unittests/Support/Threading.cpp
+++ b/llvm/unittests/Support/Threading.cpp
@@ -16,7 +16,7 @@ using namespace llvm;
namespace {
TEST(Threading, PhysicalConcurrency) {
- auto Num = hardware_physical_concurrency();
+ auto Num = heavyweight_hardware_concurrency();
// Since Num is unsigned this will also catch us trying to
// return -1.
ASSERT_LE(Num, thread::hardware_concurrency());
OpenPOWER on IntegriCloud