[all-commits] [llvm/llvm-project] fcca10: [AArch64] Add support for -march=native for Apple ...

Keith Smiley via All-commits all-commits at lists.llvm.org
Wed Mar 23 14:07:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fcca10c69aaab539962d10fcc59a5f074b73b0de
      https://github.com/llvm/llvm-project/commit/fcca10c69aaab539962d10fcc59a5f074b73b0de
  Author: Keith Smiley <keithbsmiley at gmail.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M clang/lib/Driver/ToolChains/Arch/AArch64.cpp
    M llvm/lib/Support/Host.cpp

  Log Message:
  -----------
  [AArch64] Add support for -march=native for Apple M1 CPU

This improves the getHostCPUName check for Apple M1 CPUs, which
previously would always be considered cyclone instead. This also enables
`-march=native` support when building on M1 CPUs which would previously
fail. This isn't as sophisticated as the X86 CPU feature checking which
consults the CPU via getHostCPUFeatures, but this is still better than
before. This CPU selection could also be invalid if this was run on an
iOS device instead, ideally we can improve those cases as they come up.

Differential Revision: https://reviews.llvm.org/D119788




More information about the All-commits mailing list