[PATCH] D130677: [AMDGPU] Fix DGEMM hazard for GFX90a

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 16:52:13 PDT 2022


vangthao marked 4 inline comments as done.
vangthao added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp:2346
+          auto IsDGEMMHazard = [this](const MachineInstr &MI) {
+            if (!TII.isVALU(MI))
+              return false;
----------------
rampitec wrote:
> In fact you are using getWaitStatesSinceDef, so all you you need to check there is a DGEMM on path. Instead of the whole this function you could just `return isDGEMM(MI.getOpcode())`. No even need in a custom IsExpired or capturing anything.
I believe `getWaitStatesSinceDef` also includes a check if the MI modifies the reg. Since the DGEMM instruction itself does not modify the reg, it will never return as a hazard. I have simplified the hazard check to include if we saw a DGEMM and if reg is defined by VALU.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130677/new/

https://reviews.llvm.org/D130677



More information about the llvm-commits mailing list