[llvm] [RISCV] Add searchable table for tune information (PR #66193)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 09:37:29 PDT 2023
================
@@ -65,6 +71,11 @@ RISCVSubtarget::initializeSubtargetDependencies(const Triple &TT, StringRef CPU,
if (TuneCPU.empty())
TuneCPU = CPU;
+ TuneInfo = RISCVTuneInfoTable::getRISCVTuneInfo(TuneCPU);
+ // If there is no TuneInfo for this CPU, we fail back to generic.
+ if (!TuneInfo)
+ TuneInfo = RISCVTuneInfoTable::getRISCVTuneInfo("generic");
----------------
topperc wrote:
assert than `TuneInfo` isn't null for "generic"?
https://github.com/llvm/llvm-project/pull/66193
More information about the llvm-commits
mailing list