aco/gfx10: Fix mitigation of VMEMtoScalarWriteHazard.
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 23 Oct 2019 19:51:14 +0000 (21:51 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Fri, 25 Oct 2019 08:10:42 +0000 (10:10 +0200)
commitb01847bd94dc15913911b8badf312a3689314d86
tree4a1f1b304668884a4107ecbd195dada73c950c12
parentc037ba1bb7aba99bd15e063bbdbc6d4c68cf2384
aco/gfx10: Fix mitigation of VMEMtoScalarWriteHazard.

This commit refines the VMEMtoScalarWriteHazard mitigation, based
upon a closer look at what LLVM does. Also changes the code to
match the structure of the other hazard mitigations.

* The hazard is not only triggered by VMEM, FLAT and GLOBAL
  but also SCRATCH and DS instructions.
* The SMEM/SALU instructions only cause a hazard when they
  write a register that the VMEM/etc. are reading.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
src/amd/compiler/aco_insert_NOPs.cpp