From 721147a05d47229252dc49460f6de1eec793bfc2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 14 May 2020 15:43:31 -0700 Subject: [PATCH] freedreno/ir3/deps: report progress Signed-off-by: Rob Clark Part-of: --- src/freedreno/ir3/ir3.h | 2 +- src/freedreno/ir3/ir3_sched.c | 23 +++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index 70ead4e6cc8..a33050956aa 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -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; diff --git a/src/freedreno/ir3/ir3_sched.c b/src/freedreno/ir3/ir3_sched.c index 57567555fd4..e6241215d1d 100644 --- a/src/freedreno/ir3/ir3_sched.c +++ b/src/freedreno/ir3/ir3_sched.c @@ -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; } -- 2.30.2