[clang] [RISCV] Implement validateGlobalRegisterVariable. (PR #109596)
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 23 10:22:42 PDT 2024
================
@@ -486,3 +486,15 @@ bool RISCVTargetInfo::validateCpuSupports(StringRef Feature) const {
bool RISCVTargetInfo::isValidFeatureName(StringRef Name) const {
return llvm::RISCVISAInfo::isSupportedExtensionFeature(Name);
}
+
+bool RISCVTargetInfo::validateGlobalRegisterVariable(
+ StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const {
+ if (RegName == "ra" || RegName == "sp" || RegName == "gp" ||
----------------
topperc wrote:
Yeah it didn't seem useful. You can still do it with "x0" because I didn't think it was worth the extra code to check for it.
https://github.com/llvm/llvm-project/pull/109596
More information about the cfe-commits
mailing list