[PATCH] D83079: [clang] Default target features implied by `-march` on AArch64.

Francesco Petrogalli via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 12:58:17 PDT 2020


fpetrogalli created this revision.
fpetrogalli added reviewers: sdesmalen, efriedma, SjoerdMeijer.
Herald added subscribers: cfe-commits, danielkiss, kristof.beyls.
Herald added a project: clang.

This patch is trying to align the interpretation of `-march` on
AArch64 to what GCC has, in terms of the target features associated to
a value of the architecture version, whether armv8a, armv8.1a, ..., up
to armv8.6.

Ideally we would like to fully implement the recursive function

features(8.X) =  {new features of 8.X} U features(8.(X-1))

as GCC describes it in
https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html#AArch64-Options,
under the option `-march=name`.

However, in this initial patch we had to stop at version 8.5 of the
architecture because there seem to be some disagreement on what is the
right set of features for armv8.4a.

Once the disagreement is sorted, we will extent the behavior of
`AddAArch64DefaultFeatures` to cascade across all the architecture
versions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83079

Files:
  clang/lib/Driver/ToolChains/Arch/AArch64.cpp
  clang/test/Driver/aarch64-cpus.c
  clang/test/Driver/aarch64-march-default-features.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83079.275206.patch
Type: text/x-patch
Size: 5664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200702/e724312b/attachment-0001.bin>


More information about the cfe-commits mailing list