[llvm] [clang] [RISCV][Clang][TargetParser] Support getting feature unaligned-scalar-mem from mcpu. (PR #71513)
Yeting Kuo via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 05:25:27 PST 2023
================
@@ -44,6 +45,11 @@ static const CPUInfo *getCPUInfoByName(StringRef CPU) {
return nullptr;
}
+bool hasFastUnalignedAccess(StringRef CPU) {
+ const CPUInfo *Info = getCPUInfoByName(CPU);
+ return Info && Info->FastUnalignedAccess;
----------------
yetingk wrote:
It's possible that `Info` is `nullptr` here when CPU is not defined in `RISCVProcessors.td`.
https://github.com/llvm/llvm-project/pull/71513
More information about the llvm-commits
mailing list