[llvm] [AMDGPU] Add support for GFX12 expert scheduling mode 2 (PR #170319)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 2 08:23:59 PST 2025


================
@@ -2741,7 +2979,14 @@ bool SIInsertWaitcnts::run(MachineFunction &MF) {
   AMDGPU::IsaVersion IV = AMDGPU::getIsaVersion(ST->getCPU());
 
   if (ST->hasExtendedWaitCounts()) {
-    MaxCounter = NUM_EXTENDED_INST_CNTS;
+    if (ST->hasSoftwareHazardMode() &&
+        (MF.getFunction()
+             .getFnAttribute("amdgpu-software-hazard-mode")
----------------
jayfoad wrote:

Reviewers: should this be a module flag instead of a per-function attribute? We have no plans to support switching sched mode on a function call/return.

https://github.com/llvm/llvm-project/pull/170319


More information about the llvm-commits mailing list