Mesa (master): aco: a couple loop handling fixes for GFX10 hazard pass

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 30 18:14:16 UTC 2019


Module: Mesa
Branch: master
Commit: d4684a294baf636d1bf71b51537bf229c31ec085
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4684a294baf636d1bf71b51537bf229c31ec085

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue Oct 29 11:19:39 2019 +0000

aco: a couple loop handling fixes for GFX10 hazard pass

It was joining from the wrong blocks and block.kind is a bitmask instead
of an enum.

Reviewed-By: Timur Kristóf <timur.kristof at gmail.com>

---

 src/amd/compiler/aco_insert_NOPs.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/amd/compiler/aco_insert_NOPs.cpp b/src/amd/compiler/aco_insert_NOPs.cpp
index 5296f6ac045..2c69407b808 100644
--- a/src/amd/compiler/aco_insert_NOPs.cpp
+++ b/src/amd/compiler/aco_insert_NOPs.cpp
@@ -560,13 +560,13 @@ void mitigate_hazards_gfx10(Program *program)
       Block& block = program->blocks[i];
       NOP_ctx_gfx10 &ctx = all_ctx[i];
 
-      if (block.kind == block_kind_loop_header) {
+      if (block.kind & block_kind_loop_header) {
          loop_header_indices.push(i);
-      } else if (block.kind == block_kind_loop_exit) {
+      } else if (block.kind & block_kind_loop_exit) {
          /* Go through the whole loop again */
          for (unsigned idx = loop_header_indices.top(); idx < i; idx++) {
             NOP_ctx_gfx10 loop_block_ctx;
-            for (unsigned b : block.linear_preds)
+            for (unsigned b : program->blocks[idx].linear_preds)
                loop_block_ctx.join(all_ctx[b]);
 
             handle_block_gfx10(loop_block_ctx, program->blocks[idx]);




More information about the mesa-commit mailing list