[PATCH] D136425: [Clang][AArch64] Add support for -mcpu=grace
Sushant Gokhale via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 04:55:36 PDT 2022
sushgokh added inline comments.
================
Comment at: llvm/include/llvm/Support/AArch64TargetParser.def:247
AArch64::AEK_I8MM | AArch64::AEK_MTE))
+AARCH64_CPU_NAME("grace", ARMV9A, FK_NEON_FP_ARMV8, false,
+ (AArch64::AEK_SVE | AArch64::AEK_SVE2 | AArch64::AEK_SSBS |
----------------
SjoerdMeijer wrote:
> sushgokh wrote:
> > Can you check if the test case compiles without this because we are already returning "neoverse-v2" at frontend in clang/lib/Driver/ToolChains/Arch/AArch64.cpp ?
> This is a very good point. And I tried this first, but the result was that we then first get a "unrecognised cpu" warning. Thus, I found it easier to just add the definition here.
>
> The other thing about this is that we don't necessarily need the "full definition" with all the architecture extensions, but thought that when I add I might as well be complete.
Check if this helps:
@@ -124,6 +128,9 @@ static bool DecodeAArch64Mcpu(const Driver &D, StringRef Mcpu, StringRef &CPU,
if (CPU == "native")
CPU = llvm::sys::getHostCPUName();
+ if(CPU == "grace")
+ CPU="neoverse-v2";
+
if (CPU == "generic") {
Features.push_back("+neon");
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136425/new/
https://reviews.llvm.org/D136425
More information about the llvm-commits
mailing list