[PATCH] D124671: [AMDGPU] Do not raise wave priority beyond a specific number of VALU instructions.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 10:58:49 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp:30-31
+static cl::opt<unsigned> VALUInstsThreshold(
+    "amdgpu-set-wave-priority-valu-insts-threshold",
+    cl::desc("VALU instruction count threshold for adjusting wave priority"),
+    cl::init(100), cl::Hidden);
----------------
Should we be counting cycles instead of instructions?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp:140
+      if (SIInstrInfo::isVALU(MI))
+        ++NumVALUInsts;
+    }
----------------
You're counting VALU instructions here and above?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp:198-199
+    if (MachineInstr *LastVMEMLoad = MBBInfos[MBB].LastVMEMLoad) {
+      MBB->insertAfter(MachineBasicBlock::instr_iterator(LastVMEMLoad),
+                       Setprio);
+      continue;
----------------
Why not construct directly at the insert point?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124671



More information about the llvm-commits mailing list