[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-03-23 Thread Keith Smiley via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfcca10c69aaa: [AArch64] Add support for -march=native for Apple M1 CPU (authored by keith). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-03-23 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. Reading this again, I have a feeling defaulting to newest will come back to bite us (or, well, apple folks.) But we can reevaluate if we get to that. So, LGTM, thanks! Repository: rG LLVM

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-03-14 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. Bump, I think I've covered everything here, let me know if not! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788 ___ cfe-commits mailing

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-03-12 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 414878. keith added a comment. Fix typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788 Files: clang/lib/Driver/ToolChains/Arch/AArch64.cpp

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-03-12 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 414866. keith added a comment. Herald added a project: All. Update default to latest known CPU Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788 Files:

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Keith Smiley via Phabricator via cfe-commits
keith added inline comments. Comment at: llvm/lib/Support/Host.cpp:1326 + case CPUFAMILY_ARM_CYCLONE: +return "apple-a7"; + case CPUFAMILY_ARM_TYPHOON: jrtc27 wrote: > ARM only calls it cyclone, AArch64 allows both but apple-a7 is the canonical > name

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 410040. keith marked 2 inline comments as done. keith added a comment. Code review improvements Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788 Files:

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D119788#3331324 , @keith wrote: > Thanks for the tips! I left the default as generic here, but I totally take > your point on defaulting to the newest and I'm happy to update if you feel > strongly, lmk what you think I agree

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-17 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: llvm/lib/Support/Host.cpp:1320 + int Error = sysctlbyname("hw.cpufamily", , , NULL, 0); + assert(!Error && "Fetching hw.cpufamily failed"); Not sure this should be an assert? I think other implementations will fall

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-17 Thread Keith Smiley via Phabricator via cfe-commits
keith added a comment. Thanks for the tips! I left the default as generic here, but I totally take your point on defaulting to the newest and I'm happy to update if you feel strongly, lmk what you think Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-17 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 409849. keith added a comment. Update to read CPU from sysctl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788 Files: clang/lib/Driver/ToolChains/Arch/AArch64.cpp

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-15 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. Sorry, that was an old xnu version, the newest one is https://opensource.apple.com/source/xnu/xnu-7195.81.3/osfmk/mach/machine.h.auto.html which has | `CPUFAMILY_ARM_CYCLONE`| 0x37a09642 | `apple-a7` | | `CPUFAMILY_ARM_TYPHOON`

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-15 Thread Tim Northover via Phabricator via cfe-commits
t.p.northover added a comment. Things have moved on since the ARM and (especially) PPC variants of that function were written. That field (despite the name) is now more of an ABI tag and not going to be updated with each CPU. I think the modern replacement for it is `hw.cpufamily` obtained

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-14 Thread Keith Smiley via Phabricator via cfe-commits
keith added reviewers: beanz, efriedma. keith added a comment. Adding folks from https://reviews.llvm.org/D69597 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119788/new/ https://reviews.llvm.org/D119788

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-14 Thread Keith Smiley via Phabricator via cfe-commits
keith created this revision. Herald added subscribers: dexonsmith, pengfei, hiraditya, kristof.beyls. keith requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This improves the getHostCPUName check for Apple M1