[llvm] [RISCV] Adopt SpacemitX60's scheduling model for `-mtune=generic` (PR #167008)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 14:23:53 PST 2025
================
@@ -102,7 +102,12 @@ def GENERIC_RV64 : RISCVProcessorModel<"generic-rv64",
GenericTuneInfo;
// Support generic for compatibility with other targets. The triple will be used
// to change to the appropriate rv32/rv64 version.
-def GENERIC : RISCVTuneProcessorModel<"generic", NoSchedModel>, GenericTuneInfo;
+// `generic` is expected to target in-order application processors designed for
+// general-purpose computing.
+def GENERIC : RISCVTuneProcessorModel<"generic", SpacemitX60Model>,
----------------
mshockwave wrote:
It does, but it will not remap `-mtune=generic`.
So after this patch, `-mtune=generic` effectively becomes `-mtune=spacemit-x60` while `-mcpu=generic/generic-rv32/generic-rv64` stay the same.
Now, if we want to make `-mtune=generic` and `-mcpu=generic` having the same behavior, then we need to update nearly all the test cases, hence the question I raised in the PR description.
https://github.com/llvm/llvm-project/pull/167008
More information about the llvm-commits
mailing list