[Clang][AArch64] Add support for -mcpu=grace
authorSjoerd Meijer <smeijer@nvidia.com>
Mon, 24 Oct 2022 12:00:34 +0000 (17:30 +0530)
committerSjoerd Meijer <sjoerd.meijer@gmail.com>
Mon, 24 Oct 2022 12:06:24 +0000 (17:36 +0530)
commit9ec7448857c1bcbc9878e9912167d9453d3be673
treec5567c9d137fb6d4070cf9c1dedbe0c86cfc0864
parentcbc378ecb87e3f31dd5aff91f2a621d500640412
[Clang][AArch64] Add support for -mcpu=grace

This adds Clang command line support for the NVIDIA Grace CPU [1], which
we would like to target with -mcpu=grace.

Grace is based on the Arm Neoverse V2 CPU [1], which is why, in the
driver, we pass neoverse-v2 to the compiler when grace is requested.
Thus, for now, it's an alias to Neoverse V2.

This adds support for grace in user-facing tool Clang, but not yet the
developer tools like opt and llc, so we probably want to follow up on
this.

[1] https://www.nvidia.com/en-us/data-center/grace-cpu/

Differential Revision: https://reviews.llvm.org/D136425
clang/lib/Driver/ToolChains/Arch/AArch64.cpp
clang/test/Driver/aarch64-mcpu.c
llvm/include/llvm/Support/AArch64TargetParser.h