[clang] [llvm] [RISCV] Support RISC-V Profiles in -march option (PR #76357)
Brandon Wu via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 19:20:16 PDT 2024
================
@@ -854,6 +895,30 @@ 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;
----------------
4vtomat wrote:
`NewArch` might be assigned twice, I'm wondering whether we can pre-reserve a chunk of memory beforehand to prevent 1 more memory allocation?
https://github.com/llvm/llvm-project/pull/76357
More information about the cfe-commits
mailing list