================
@@ -371,6 +371,25 @@ inline CoExecInfo CoExecInfo::build(unsigned UnitOccupancy,
/// Get co-execution info for a gfx950 MFMA instruction.
CoExecInfo getMFMACoExecInfo(unsigned Opcode);
+/// Get the first cycle, counted from \p MFMA issuing at cycle 0, at which a
+/// VALU can issue on gfx942 (MI300X, or MI308X with the peak TOPS limiter
+/// enabled) or on gfx950. With the limiter disabled, MI308X holds VALU until
+/// an XDL's passes end. A scaled MFMA is assumed to issue behind another MFMA;
+/// issued into an idle MFMA pipe, it takes one more cycle.
+unsigned getVALUIssueCycle(const MachineInstr &MFMA, const SIInstrInfo &TII);
+
+/// Same as getVALUIssueCycle, for a packed VALU or a DOT with opcode
+/// \p PackedVALUOpc.
+unsigned getPackedVALUIssueCycle(const MachineInstr &MFMA,
+ unsigned PackedVALUOpc,
+ const SIInstrInfo &TII);
+
+/// Same as getVALUIssueCycle, for a packed VALU that is FMA-like
+/// (V_PK_{ADD,FMA,MUL}_F32 or V_PK_MOV_B32) if \p IsFMALike, or for a DOT if
+/// \p IsDOTLike.
+unsigned getPackedVALUIssueCycle(const MachineInstr &MFMA, bool IsFMALike,
----------------
shiltian wrote:
These interfaces are not well designed. They are too ad-hoc. Why do we even
need two or three functions just to figure out at which cycle an instruction
can be co-issued with a MFMA instruction, one of which has two bool to indicate
whether it is FMA or DOT like? We can definitely do a better job here.
https://github.com/llvm/llvm-project/pull/233721
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits