freedreno/ir3/deps: report progress
authorRob Clark <robdclark@chromium.org>
Thu, 14 May 2020 22:43:31 +0000 (15:43 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 19 May 2020 16:06:17 +0000 (16:06 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048>

src/freedreno/ir3/ir3.h
src/freedreno/ir3/ir3_sched.c

index 70ead4e6cc8c09360e6538c1de760ac695d421bc..a33050956aa0211eec26a5f1395e7fdecea668c8 100644 (file)
@@ -1204,7 +1204,7 @@ bool ir3_cp(struct ir3 *ir, struct ir3_shader_variant *so);
 void ir3_group(struct ir3 *ir);
 
 /* scheduling: */
-void ir3_sched_add_deps(struct ir3 *ir);
+bool ir3_sched_add_deps(struct ir3 *ir);
 int ir3_sched(struct ir3 *ir);
 
 struct ir3_context;
index 57567555fd4ab75f00fa9d32bab3302c5d403f5d..e6241215d1dfd6337f89ec9640bdfdfb95d2308c 100644 (file)
@@ -1202,20 +1202,19 @@ add_barrier_deps(struct ir3_block *block, struct ir3_instruction *instr)
  *  (2) reads that come before a write actually get scheduled before the
  *      write
  */
-static void
-calculate_deps(struct ir3_block *block)
-{
-       foreach_instr (instr, &block->instr_list) {
-               if (instr->barrier_class) {
-                       add_barrier_deps(block, instr);
-               }
-       }
-}
-
-void
+bool
 ir3_sched_add_deps(struct ir3 *ir)
 {
+       bool progress = false;
+
        foreach_block (block, &ir->block_list) {
-               calculate_deps(block);
+               foreach_instr (instr, &block->instr_list) {
+                       if (instr->barrier_class) {
+                               add_barrier_deps(block, instr);
+                               progress = true;
+                       }
+               }
        }
+
+       return progress;
 }