[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 11:27:36 PDT 2024
================
@@ -854,6 +854,81 @@ RISCVISAInfo::parseArchString(StringRef Arch, bool EnableExperimentalExtension,
"string must be lowercase");
}
+ bool IsProfile = Arch.starts_with("rvi") || Arch.starts_with("rva") ||
+ Arch.starts_with("rvb") || Arch.starts_with("rvm");
+ std::string NewArch;
+ if (IsProfile) {
+ // A mapping from profile name to march string with all mandatory
+ // extensions.
+ static const std::map<StringLiteral, StringLiteral> SupportedProfiles = {
----------------
topperc wrote:
Yeah this is going to be a global constructor which is against coding standards. https://llvm.org/docs/CodingStandards.html#do-not-use-static-constructors
https://github.com/llvm/llvm-project/pull/76357
More information about the llvm-commits
mailing list