[llvm] unpack packed instructions overlapped by MFMAs post-RA scheduling (PR #157968)
Jan Patrick Lehr via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 07:14:30 PDT 2025
================
@@ -39,6 +48,37 @@ class SIPreEmitPeephole {
const MachineBasicBlock &From,
const MachineBasicBlock &To) const;
bool removeExeczBranch(MachineInstr &MI, MachineBasicBlock &SrcMBB);
+ // Check if the machine instruction being processed is a supported packed
+ // instruction
+ bool isUnpackingSupportedInstr(MachineInstr &MI) const;
+ // Creates a list of packed instructions following an MFMA that are suitable
+ // for unpacking.
+ void createListOfPackedInstr(MachineInstr &BeginMI,
+ SetVector<MachineInstr *> &InstrsToUnpack,
+ uint16_t NumMFMACycles);
+ // Identify register dependencies between those used by the MFMA
+ // instruction and the following packed instructions. Conservatively ensures
+ // that we do not incorrectly read/write registers.
+ bool hasReadWriteDependencies(const MachineInstr &PredMI,
+ const MachineInstr &SuccMI);
+ // Unpack F32 packed instructions, such as V_PK_MUL, V_PK_ADD, and V_PK_FMA.
+ // Currently, only V_PK_MUL, V_PK_ADD, V_PK_FMA are supported for this
+ // transformation.
+ void processF32Unpacking(MachineInstr &I);
----------------
jplehr wrote:
```suggestion
void performF32Unpacking(MachineInstr &I);
```
If that method actually performs the unpacking
https://github.com/llvm/llvm-project/pull/157968
More information about the llvm-commits
mailing list