Skip to content
Commit d441188c authored by Fangrui Song's avatar Fangrui Song
Browse files

[Support][X86] Change getHostNumPhsicalCores() to return number of physical...

[Support][X86] Change getHostNumPhsicalCores() to return number of physical cores enabled by affinity

Fixes https://bugs.llvm.org/show_bug.cgi?id=45556

While here, make the x86-64 code available for x86-32.

The output has been available and stable since
https://git.kernel.org/linus/3dd9d514846cdca1dcef2e4fce666d85e199e844 (2005)
```
processor:
...
physical id:
siblings:
core id:
```

Don't check HAVE_SCHED_GETAFFINITY/HAVE_CPU_COUNT. The interface is
simply available in every libc which can build LLVM.

Reviewed By: aganea

Differential Revision: https://reviews.llvm.org/D78324
parent 55e3a7c6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment