aco: Refactor hazard mitigations, separate pass for GFX10.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 24 Oct 2019 10:26:12 +0000 (12:26 +0200)
committerTimur Kristóf <timur.kristof@gmail.com>
Fri, 25 Oct 2019 08:10:42 +0000 (10:10 +0200)
commitc580f134ae5d7e9f24e8b1bfc405825b5d413414
tree27c8f03fca9f6209baf71bd02c0da22ab2411b1a
parentb01847bd94dc15913911b8badf312a3689314d86
aco: Refactor hazard mitigations, separate pass for GFX10.

GFX10 hazards require a different approach compared to previous
generations, for example it doesn't need s_nop, and most hazards
can't be solved by adding NOPs at all. Also, they are not
resolved by branch instructions.

This commit reorganizes aco_insert_NOPs so that there is now a
separate pass for GFX10. The new GFX10 pass also respects the
control flow of the shader.

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