From: Rob Clark Date: Thu, 14 May 2020 22:43:31 +0000 (-0700) Subject: freedreno/ir3/deps: report progress X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=721147a05d47229252dc49460f6de1eec793bfc2;p=mesa.git freedreno/ir3/deps: report progress Signed-off-by: Rob Clark Part-of: --- 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; }