aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStackLayout.cpp
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2021-01-13 20:59:31 -0500
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>2021-01-13 21:00:09 -0500
commit336ab2d51dfdd5ca09c2a9c506453db4fe653584 (patch)
treeb05ad2cceb309a10a44e31d6ecb8d3d92baa075d /llvm/lib/CodeGen/SafeStackLayout.cpp
parentcd4c55c97402246099ae865a66517a36af5c3a7c (diff)
downloadllvm-336ab2d51dfdd5ca09c2a9c506453db4fe653584.zip
llvm-336ab2d51dfdd5ca09c2a9c506453db4fe653584.tar.gz
llvm-336ab2d51dfdd5ca09c2a9c506453db4fe653584.tar.bz2
[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
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackLayout.cpp')
0 files changed, 0 insertions, 0 deletions