[AMDGPU] Adjust wave priority based on VMEM instructions to avoid duty-cycling.
authorIvan Kosarev <ivan.kosarev@amd.com>
Wed, 27 Apr 2022 13:07:52 +0000 (14:07 +0100)
committerIvan Kosarev <ivan.kosarev@amd.com>
Wed, 27 Apr 2022 13:37:18 +0000 (14:37 +0100)
commit6ddf2a824da97c81d7963c082c62640e8173b5b0
tree4fac5f074f09c99bab48a92f0463b7567559ebf2
parent6e8dda047fe0694e113d6571044be154a5059473
[AMDGPU] Adjust wave priority based on VMEM instructions to avoid duty-cycling.

As older waves execute long sequences of VALU instructions, this may
prevent younger waves from address calculation and then issuing their
VMEM loads, which in turn leads the VALU unit to idle. This patch tries
to prevent this by temporarily raising the wave's priority.

Reviewed By: foad

Differential Revision: https://reviews.llvm.org/D124246
llvm/lib/Target/AMDGPU/AMDGPU.h
llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp [new file with mode: 0644]
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
llvm/lib/Target/AMDGPU/CMakeLists.txt
llvm/test/CodeGen/AMDGPU/set-wave-priority.ll [new file with mode: 0644]