[AMDGPU] Add support for GFX11 LDSDIR hazards
authorJay Foad <jay.foad@amd.com>
Thu, 16 Jun 2022 14:02:06 +0000 (15:02 +0100)
committerJay Foad <jay.foad@amd.com>
Mon, 20 Jun 2022 20:58:12 +0000 (21:58 +0100)
commit13107c2770dfdbb95ad07fa9235116fbf26e38f0
tree54e7ba3640b9b59115c840a408e9627692bd4336
parentbbf3fd4af1653693c7ada225c07cbd485ad1463c
[AMDGPU] Add support for GFX11 LDSDIR hazards

Detect LDS direct WAR/WAW hazards and compute values for
wait_vdst (va_vdst) parameter.  Where appropriate this
raises wait_vdst from the default 0 to allow concurrent
issue of LDS direct with VALU execution.

Also detect LDS direct versus VMEM source VGPR hazards
and insert vm_vsrc=0 waits using s_waitcnt_depctr.

Differential Revision: https://reviews.llvm.org/D127963
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h
llvm/test/CodeGen/AMDGPU/lds-direct-hazards.mir [new file with mode: 0644]