[llvm] [AIX][PowerPC] Teach the Threading Library About the Number of Physical Cores on AIX (PR #67683)
David Tenty via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 07:40:23 PDT 2023
================
@@ -432,6 +436,8 @@ static int computeHostNumPhysicalCores() {
static_cast<uintptr_t>(reinterpret_cast<unsigned int &>(CVT[CVTCSD])));
return reinterpret_cast<int &>(CSD[CSD_NUMBER_ONLINE_STANDARD_CPS]);
}
+#elif defined(_AIX)
+static int computeHostNumPhysicalCores() { return _system_configuration.ncpus; }
----------------
daltenty wrote:
If we want to do this version then we can opt into the `elif defined(__linux__) && defined(__s390x__)` block above which has this implementation (is it really better to make the syscall though rather than reading the structure?)
https://github.com/llvm/llvm-project/pull/67683
More information about the llvm-commits
mailing list