[llvm] [AMDGPU][CoExecSched] Add free-proximity scheduling heuristic (PR #225334)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 02:02:21 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Romanov Vlad (romanovvlad)

<details>
<summary>Changes</summary>

Add a new scheduling heuristic that sorts PrioritySUs preferring candidates closer to killing registers, reducing live register pressure.

Two-level comparison:
1. Prefer cand with more registers whose producers all have exactly 1 unscheduled successor (scheduling can free those registers immediately).
2. Prefer cand with lower min unscheduled successors among remaining registers (closer to killing in future).

Unscheduled successors are computed manually as NumSuccsLeft is not decremented in top-down scheduling.

When active, PrioritySUs are rebuilt every pick cycle to reflect the current scheduling state.

By default (auto mode) the heuristic is enabled when VGPR pressure approaches the excess limit, which is recomputed per each pick.

Option -amdgpu-coexec-reg-free-proximity={off,auto,always} controls the behavior.

---
Full diff: https://github.com/llvm/llvm-project/pull/225334.diff


3 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.cpp (+175-36) 
- (modified) llvm/lib/Target/AMDGPU/AMDGPUCoExecSchedStrategy.h (+30-2) 
- (added) llvm/test/CodeGen/AMDGPU/coexec-reg-free-proximity.mir (+56) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


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


More information about the llvm-commits mailing list