[PATCH] D151730: [RISCV] Support target attribute for function
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 21:40:52 PDT 2023
craig.topper added inline comments.
================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:370
+ std::vector<std::string> &Features) {
+ Features.push_back("__RISCV_TargetAttrNeedOverride");
+ auto RII = llvm::RISCVISAInfo::parseArchString(
----------------
Why do we need "__RISCV_TargetAttrNeedOverride"?
================
Comment at: clang/lib/Basic/Targets/RISCV.cpp:434
+ if (MarchFromCPU != "") {
+ Ret.Features.clear();
+ handleFullArchString(MarchFromCPU, Ret.Features);
----------------
BeMg wrote:
> craig.topper wrote:
> > Why does this clear Ret.Features, but full-arch-string doesn't?
> I think full-arch-string also clear the Ret.Features in line 398 right after `if (Feature.startswith("arch="))`.
Thanks. I missed it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151730/new/
https://reviews.llvm.org/D151730
More information about the llvm-commits
mailing list