1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/lib/Support/Windows
Alexandre Ganea 11bbe8413e Re-land [Support] On Windows, take the affinity mask into account
The number of hardware threads available to a ThreadPool can be limited if setting an affinity mask.
For example:

    > start /B /AFFINITY 0xF lld-link.exe ...

Would let LLD only use 4 hyper-threads.

Previously, there was an outstanding issue on Windows Server 2019 on dual-CPU machines, which was preventing from using both CPU sockets. In normal conditions, when no affinity mask was set, ProcessorGroup::AllThreads was different from ProcessorGroup::UsableThreads. The previous code in llvm/lib/Support/Windows/Threading.inc L201 was improperly assuming those two values to be equal, and consequently was limiting the execution to only one CPU socket.

Differential Revision: https://reviews.llvm.org/D92419
2021-01-14 17:03:22 -05:00
..
COM.inc
DynamicLibrary.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
explicit_symbols.inc
Host.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Memory.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Path.inc [Support] PR42623: Avoid setting the delete-on-close bit if a TempFile doesn't reside on a local drive 2020-10-30 13:37:40 -04:00
Process.inc Support: Avoid SmallVector::assign with a range from to-be-replaced vector in Windows GetExecutableName 2020-11-18 17:55:49 -08:00
Program.inc Re-land [Support] On Windows, take the affinity mask into account 2021-01-14 17:03:22 -05:00
Signals.inc [Support] On Unix, let the CrashRecoveryContext return the signal code 2020-09-24 08:21:43 -04:00
Threading.inc Re-land [Support] On Windows, take the affinity mask into account 2021-01-14 17:03:22 -05:00
ThreadLocal.inc llvm-ar: Fix MinGW compilation 2020-02-28 09:59:24 +01:00
Watchdog.inc