[llvm] [LTO] Set default Darwin CPU to apple-a7 for AArch64 (PR #81540)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 00:55:19 PST 2024
================
@@ -419,7 +419,7 @@ bool LTOCodeGenerator::determineTarget() {
Config.CPU = "apple-a12";
else if (Triple.getArch() == llvm::Triple::aarch64 ||
Triple.getArch() == llvm::Triple::aarch64_32)
- Config.CPU = "cyclone";
+ Config.CPU = "apple-a7";
----------------
fhahn wrote:
Note that for ARM64 macOS the default CPU is `apple-m1` instead. While you are here, it would probably be worth adjusting that also (see https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Arch/AArch64.cpp#L50)
There probably should be a helper function to return the default CPU string and have it used at least for all `llvm/lib/LTO` changes, possibly also in Clang, to prevent those things from drifting apart in the future again.
https://github.com/llvm/llvm-project/pull/81540
More information about the llvm-commits
mailing list