[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-29 Thread Rainer Orth via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbf3714884ae4: [clang][Driver] Handle SPARC -mcpu=native etc. (authored by ro). Changed prior to commit: https://reviews.llvm.org/D130273?vs=448290

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-28 Thread Rainer Orth via Phabricator via cfe-commits
ro updated this revision to Diff 448290. ro marked 3 inline comments as done. ro edited the summary of this revision. ro added a comment. - Incorporate review comments. - Add testcases. - Reject `-march`, matching GCC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-22 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Arch/Sparc.cpp:121 +StringRef CPUName = A->getValue(); + +if (CPUName == "native") { delete blank line

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-22 Thread Rainer Orth via Phabricator via cfe-commits
ro added a comment. In D130273#3670623 , @MaskRay wrote: > I notice that in gcc, -march/-mtune/-mcpu are handled in gcc/config/* and > every port may have somewhat different behaviors. E.g. x86 and aarch64 are > different (and I suspect x86 has the weir

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2225 +StringRef Name = A->getValue(); + +std::string TuneCPU; delete blank line after a variable declaration Comment at: clang/lib/Driver/ToolChains/Clang.

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I notice that in gcc, -march/-mtune/-mcpu are handled in gcc/config/* and every port may have somewhat different behaviors. E.g. x86 and aarch64 are different (and I suspect x86 has the weird behavior). Have you checked that whether this matches GCC? We need some clang/

[PATCH] D130273: [clang][Driver] Handle SPARC -mcpu=native etc.

2022-07-21 Thread Rainer Orth via Phabricator via cfe-commits
ro created this revision. ro added reviewers: MaskRay, glaubitz, jrtc27. ro added a project: clang. Herald added subscribers: StephenFan, fedor.sergeev, jyknight. Herald added a project: All. ro requested review of this revision. To make use of SPARC support in `getHostCPUName` as implemented by D