[PATCH] D136425: [Clang][AArch64] Add support for -mcpu=grace

Kyrill Tkachov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 06:00:40 PDT 2022


ktkachov added a comment.

In D136425#3874313 <https://reviews.llvm.org/D136425#3874313>, @SjoerdMeijer wrote:

> In D136425#3874298 <https://reviews.llvm.org/D136425#3874298>, @dmgreen wrote:
>
>> I am not against this, but as @ktkachov said it sets a new precedence. We have not in the past added CPU names which are aliases.
>>
>> If we are doing this, can we build a better way of adding aliases? Maybe a list in TargetParser.def that gets queried at the relevant places?
>
> There are a few unknowns here I think (at least for me):
>
> - Are we going to have (a lot) more aliases? I don't know, but I would guess not.
> - Do we later want to distinguish V2 from Grace (for one reason or another)? I don't know yet, but maybe.
>
> I am happy to investigate how we could introduce aliases, but then again, not sure how useful that would be given what I mentioned above; that's the reason I went for this approach, as a one-off, for now.
>
> But let me know what you think, and am happy to look.

I think having an alias capability would be useful, particularly as we sometimes want to enable codenames before an official CPU launch (like happened with "zeus" and  "demeter" in GCC) and want to retain the codenames for backwards compatibility with released toolchains. Having "grace" as an explicit alias of "neoverse-v2" would also ensure that any improvements folks make to its tuning benefit "neoverse-v2" as well. If they need to deviate in the future for some good reason then we can be explicit about it and split them into separate CPU options.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136425/new/

https://reviews.llvm.org/D136425



More information about the llvm-commits mailing list