[llvm] [RISCV] Refactor X60 scheduling model helper classes. NFC. (PR #151572)
Mikhail R. Gadelha via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 1 06:55:10 PDT 2025
================
@@ -13,78 +13,108 @@
//
//===----------------------------------------------------------------------===//
-class SMX60IsWorstCaseMX<string mx, list<string> MxList> {
- string LLMUL = LargestLMUL<MxList>.r;
- bit c = !eq(mx, LLMUL);
-}
+//===----------------------------------------------------------------------===//
+// Helpers
+
+// Maps LMUL string to corresponding value from the Values array
+// LMUL values map to array indices as follows:
+// MF8 -> Values[0], MF4 -> Values[1], MF2 -> Values[2], M1 -> Values[3],
+// M2 -> Values[4], M4 -> Values[5], M8 -> Values[6]
+// Shorter lists are allowed, e.g., widening instructions don't work on M8
+class GetLMULValue<list<int> Values, string LMUL> {
+ int Index = !cond(
----------------
mikhailramalho wrote:
done.
https://github.com/llvm/llvm-project/pull/151572
More information about the llvm-commits
mailing list