[llvm] [RISCV] Fix and refactor Zvk sched classes (PR #86519)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 08:42:36 PDT 2024
================
@@ -294,59 +288,46 @@ multiclass VPseudoVALU_V_S_NoMask_Zvk
multiclass VPseudoVALU_VV_NoMask_Zvk {
foreach m = MxListVF4 in {
defvar mx = m.MX;
- defvar WriteVIALUV_MX = !cast<SchedWrite>("WriteVIALUV_" # mx);
- defvar ReadVIALUV_MX = !cast<SchedRead>("ReadVIALUV_" # mx);
-
defm _VV : VPseudoTernaryNoMask_Zvk<m.vrclass, m.vrclass, m.vrclass, m>,
- Sched<[WriteVIALUV_MX, ReadVIALUV_MX, ReadVIALUV_MX, ReadVMask]>;
+ SchedTernary<"WriteVIALUV", "ReadVIALUV", "ReadVIALUV", "ReadVIALUV", mx>;
}
}
multiclass VPseudoVALU_VI_NoMask_Zvk {
foreach m = MxListVF4 in {
defvar mx = m.MX;
- defvar WriteVIALUV_MX = !cast<SchedWrite>("WriteVIALUV_" # mx);
- defvar ReadVIALUV_MX = !cast<SchedRead>("ReadVIALUV_" # mx);
-
defm _VI : VPseudoTernaryNoMask_Zvk<m.vrclass, m.vrclass, uimm5, m>,
- Sched<[WriteVIALUV_MX, ReadVIALUV_MX, ReadVIALUV_MX, ReadVMask]>;
+ SchedTernary<"WriteVIALUV", "ReadVIALUV", "ReadVIALUV", "ReadVIALUV", mx>;
}
}
multiclass VPseudoVALU_VI_NoMaskTU_Zvk {
foreach m = MxListVF4 in {
defvar mx = m.MX;
- defvar WriteVIALUV_MX = !cast<SchedWrite>("WriteVIALUV_" # mx);
- defvar ReadVIALUV_MX = !cast<SchedRead>("ReadVIALUV_" # mx);
-
defm _VI : VPseudoBinaryNoMaskTU_Zvk<m.vrclass, m.vrclass, uimm5, m>,
- Sched<[WriteVIALUV_MX, ReadVIALUV_MX, ReadVIALUV_MX, ReadVMask]>;
+ SchedBinary<"WriteVIALUV", "ReadVIALUV", "ReadVIALUV", mx,
+ forceMergeOpRead=true>;
}
}
multiclass VPseudoVALU_VV_NoMaskTU_Zvk {
foreach m = MxListVF4 in {
defvar mx = m.MX;
- defvar WriteVIALUV_MX = !cast<SchedWrite>("WriteVIALUV_" # mx);
- defvar ReadVIALUV_MX = !cast<SchedRead>("ReadVIALUV_" # mx);
-
defm _VV : VPseudoBinaryNoMaskTU_Zvk<m.vrclass, m.vrclass, m.vrclass, m>,
- Sched<[WriteVIALUV_MX, ReadVIALUV_MX, ReadVIALUV_MX, ReadVMask]>;
+ SchedBinary<"WriteVIALUV", "ReadVIALUV", "ReadVIALUV", mx,
+ forceMergeOpRead=true>;
}
}
multiclass VPseudoVCLMUL_VV_VX {
foreach m = MxList in {
defvar mx = m.MX;
- defvar WriteVIALUV_MX = !cast<SchedWrite>("WriteVIALUV_" # mx);
- defvar WriteVIALUX_MX = !cast<SchedWrite>("WriteVIALUV_" # mx);
- defvar ReadVIALUV_MX = !cast<SchedRead>("ReadVIALUV_" # mx);
- defvar ReadVIALUX_MX = !cast<SchedRead>("ReadVIALUX_" # mx);
-
defm "" : VPseudoBinaryV_VV<m>,
- Sched<[WriteVIALUV_MX, ReadVIALUV_MX, ReadVIALUV_MX, ReadVMask]>;
+ SchedBinary<"WriteVIALUV", "ReadVIALUV", "ReadVIALUV", mx,
----------------
michaelmaitland wrote:
I will address this in a follow up patch, where I plan to make sure that sched classes match with behavior. This patch was about the right number of classes.
https://github.com/llvm/llvm-project/pull/86519
More information about the llvm-commits
mailing list