[PATCH] D130272: [Support] Handle SPARC in sys::getHostCPUName
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 21 07:25:09 PDT 2022
ro created this revision.
ro added reviewers: glaubitz, jrtc27.
Herald added subscribers: fedor.sergeev, hiraditya, krytarowski, mgorny, jyknight.
Herald added a project: All.
ro requested review of this revision.
Herald added a project: LLVM.
While working on D118450 <https://reviews.llvm.org/D118450>, I noticed that `sys::getHostCPUName` lacks SPARC support.
This patch implements it. The code is taken from/inspired by GCC's `gcc/config/sparc/driver-sparc.cc`. There's one caveat: since LLVM, unlike GCC, doesn't support the SPARC-M7, -S7, and -M8 CPUs, I map all those to the latest supported one (UltraSparc T5/`niagara4`).
Tested on `sparcv9-sun-solaris2.11` and `sparc64-unknown-linux-gnu` by running `savcov --version` on
- Netra SPARC S7-2 (SPARC-S7, Solaris 11.4)
- SPARC T5-2 (SPARC T5, Solaris 11.4)
- SPARC Enterprise T5220 (UltraSPARC T2, Solaris 11.3)
- SPARC T5 (UltraSPARC T5, Debian sid)
- SPARC T3 (UltraSPARC T3, Debian sid)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130272
Files:
llvm/include/llvm/Support/Host.h
llvm/lib/Support/CMakeLists.txt
llvm/lib/Support/Host.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130272.446483.patch
Type: text/x-patch
Size: 5592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220721/d814e5bb/attachment.bin>
More information about the llvm-commits
mailing list