[AMDGPU] Add functions for composing and decomposing S_WAIT_DEPCTR operands
authorStephen Thomas <Stephen.Thomas@amd.com>
Tue, 4 Jul 2023 09:28:15 +0000 (10:28 +0100)
committerStephen Thomas <Stephen.Thomas@amd.com>
Tue, 4 Jul 2023 10:02:12 +0000 (11:02 +0100)
commit8aedad0fa071edabeb4f6dd50b1c82bb414f00d5
treeb013e052df06301a5ee87a8171e0839f0d889dc1
parentd7329653d0f97c9087053e91002fa1793e910f92
[AMDGPU] Add functions for composing and decomposing S_WAIT_DEPCTR operands

Add functions AMDGPU::DepCtr::encodeField*() and AMDGPU::DepCtr::decodeField*()
for each of vm_vsrc, va_vdst and sa_sdst. These are now used in
AMDGPUInsertDelayAlu and GCNHazardRecognizer so as to make working with
S_WAITCNT_DEPCTR operands easier and more readable.

Differential Revision: https://reviews.llvm.org/D154424
llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp
llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h