[llvm] [RISCV] SiFive7 VLDS Sched should not depend on VL when stride is x0. (PR #70266)
Wang Pengcheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 00:30:09 PDT 2023
================
@@ -62,6 +62,45 @@ multiclass LMULSEWWriteResMXSEW<string name, list<ProcResourceKind> resources,
def : WriteRes<!cast<SchedWrite>(name # "_WorstCase"), resources>;
}
+// Define a SchedAlias for the SchedWrite associated with (name, mx) whose
+// behavior is aliased to a Variant. The Variant has Latency predLad and
+// ReleaseAtCycles predCycles if the SchedPredicate Pred is true, otherwise has
+// Latency noPredLat and ReleaseAtCycles noPredCycles. The WorstCase SchedWrite
+// is created similiarly if IsWorstCase is true. The prefix is used to uniquely
+// define SchedWriteRes and Variant resources.
+multiclass LMULWriteResMXVariant<string name, SchedPredicate Pred,
+ list<ProcResourceKind> resources,
+ int predLat, list<int> predCycles,
+ int noPredLat, list<int> noPredCycles,
+ string mx, bit IsWorstCase, string prefix> {
+ defvar nameMX = prefix # name # "_" # mx;
+
+ // Define the different behaviors
+ def nameMX # "_Pred" : SchedWriteRes<resources>
----------------
wangpc-pp wrote:
The name of `SchedAlias` doesn't matter I think, we can just use the form `defm "SiFive7" : LMULWriteResMXVariant`.
https://github.com/llvm/llvm-project/pull/70266
More information about the llvm-commits
mailing list