[all-commits] [llvm/llvm-project] 557720: [Support] Move getHostNumPhysicalCores to Threading.h

Sam Elliott via All-commits all-commits at lists.llvm.org
Fri Nov 25 04:51:54 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5577207d6d3e0642ea047a8dfbfcf3ad372a7f25
      https://github.com/llvm/llvm-project/commit/5577207d6d3e0642ea047a8dfbfcf3ad372a7f25
  Author: Archibald Elliott <archibald.elliott at arm.com>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M clang-tools-extra/clangd/test/Inputs/BenchmarkHeader.h
    M llvm/include/llvm/Support/Host.h
    M llvm/include/llvm/Support/Threading.h
    M llvm/lib/Support/Host.cpp
    M llvm/lib/Support/Threading.cpp
    M llvm/unittests/Support/Host.cpp
    M llvm/unittests/Support/Threading.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list