[Support] Move getHostNumPhysicalCores to Threading.h
authorArchibald Elliott <archibald.elliott@arm.com>
Fri, 25 Nov 2022 12:14:48 +0000 (12:14 +0000)
committerArchibald Elliott <archibald.elliott@arm.com>
Fri, 25 Nov 2022 12:51:36 +0000 (12:51 +0000)
commit5577207d6d3e0642ea047a8dfbfcf3ad372a7f25
tree1ae3f7932bef597454d28583ee995d9fb5dd3ca7
parentb32931c5b32eb0d2cf37d688b34f8548c9674c19
[Support] Move getHostNumPhysicalCores to Threading.h

This change is focussed on simplifying `Support/Host.h` to only do
target detection. In this case, this function is close in usage to
existing functions in `Support/Threading.h`, so I moved it into there.
The function is also renamed to `llvm::get_physical_cores()` to match
the style of threading's functions.

Differential Revision: https://reviews.llvm.org/D137836
clang-tools-extra/clangd/test/Inputs/BenchmarkHeader.h
llvm/include/llvm/Support/Host.h
llvm/include/llvm/Support/Threading.h
llvm/lib/Support/Host.cpp
llvm/lib/Support/Threading.cpp
llvm/unittests/Support/Host.cpp
llvm/unittests/Support/Threading.cpp