[llvm-branch-commits] [llvm] [AMDGPU] Add HWUI pressure heuristics to coexec strategy (PR #184929)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 6 05:25:41 PST 2026
================
@@ -41,6 +41,370 @@ static SUnit *pickOnlyChoice(SchedBoundary &Zone) {
return OnlyChoice;
}
+InstructionFlavor llvm::classifyFlavor(const MachineInstr *MI,
+ const SIInstrInfo *SII) {
+ if (!MI || MI->isDebugInstr())
+ return InstructionFlavor::Other;
+
+ unsigned Opc = MI->getOpcode();
+
+ // Check for specific opcodes first.
+ if (Opc == AMDGPU::ATOMIC_FENCE || Opc == AMDGPU::S_WAIT_ASYNCCNT ||
+ Opc == AMDGPU::S_WAIT_TENSORCNT || Opc == AMDGPU::S_BARRIER_WAIT ||
+ Opc == AMDGPU::S_BARRIER_SIGNAL_IMM)
+ return InstructionFlavor::Fence;
+
+ if (Opc == AMDGPU::TENSOR_LOAD_TO_LDS_D2 ||
+ Opc == AMDGPU::TENSOR_LOAD_TO_LDS ||
+ Opc == AMDGPU::GLOBAL_LOAD_ASYNC_TO_LDS_B32 ||
+ Opc == AMDGPU::GLOBAL_LOAD_ASYNC_TO_LDS_B32_SADDR)
+ return InstructionFlavor::DMA;
+
+ if (SII->isMFMAorWMMA(*MI))
+ return InstructionFlavor::WMMA;
+
+ if (SII->isTRANS(*MI))
+ return InstructionFlavor::TRANS;
+
+ if (SII->isVALU(*MI))
+ return InstructionFlavor::SingleCycleVALU;
----------------
arsenm wrote:
Can't you pick this out of the scheduling info
https://github.com/llvm/llvm-project/pull/184929
More information about the llvm-branch-commits
mailing list