diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index bc0c851e99f..ae980eb9646 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -666,7 +666,6 @@ struct ir3_block { uint32_t dom_pre_index; uint32_t dom_post_index; - uint32_t loop_id; uint32_t loop_depth; #if MESA_DEBUG diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 5684bcc77e3..2a56c91073d 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -3769,7 +3769,6 @@ emit_block(struct ir3_context *ctx, nir_block *nblock) list_addtail(&ctx->block->node, &ctx->ir->block_list); - ctx->block->loop_id = ctx->loop_id; ctx->block->loop_depth = ctx->loop_depth; /* re-emit addr register in each block if needed: */ @@ -3926,8 +3925,6 @@ static void emit_loop(struct ir3_context *ctx, nir_loop *nloop) { assert(!nir_loop_has_continue_construct(nloop)); - unsigned old_loop_id = ctx->loop_id; - ctx->loop_id = ctx->so->loops + 1; ctx->loop_depth++; struct nir_block *nstart = nir_loop_first_block(nloop); @@ -3948,14 +3945,12 @@ emit_loop(struct ir3_context *ctx, nir_loop *nloop) struct ir3_block *start = get_block(ctx, nstart); ir3_JUMP(continue_blk); continue_blk->successors[0] = start; - continue_blk->loop_id = ctx->loop_id; continue_blk->loop_depth = ctx->loop_depth; list_addtail(&continue_blk->node, &ctx->ir->block_list); } ctx->so->loops++; ctx->loop_depth--; - ctx->loop_id = old_loop_id; } static void diff --git a/src/freedreno/ir3/ir3_context.h b/src/freedreno/ir3/ir3_context.h index adb4403aecd..c0274deeb92 100644 --- a/src/freedreno/ir3/ir3_context.h +++ b/src/freedreno/ir3/ir3_context.h @@ -107,7 +107,6 @@ struct ir3_context { unsigned num_arrays; - unsigned loop_id; unsigned loop_depth; /* a common pattern for indirect addressing is to request the diff --git a/src/freedreno/ir3/ir3_cp.c b/src/freedreno/ir3/ir3_cp.c index 9758a15fded..e2c569fbacc 100644 --- a/src/freedreno/ir3/ir3_cp.c +++ b/src/freedreno/ir3/ir3_cp.c @@ -304,22 +304,6 @@ try_swap_mad_two_srcs(struct ir3_instruction *instr, unsigned new_flags) return valid_swap; } -/* Values that are uniform inside a loop can become divergent outside - * it if the loop has a divergent trip count. This means that we can't - * propagate a copy of a shared to non-shared register if it would - * make the shared reg's live range extend outside of its loop. Users - * outside the loop would see the value for the thread(s) that last - * exited the loop, rather than for their own thread. - */ -static bool -is_valid_shared_copy(struct ir3_instruction *dst_instr, - struct ir3_instruction *src_instr, - struct ir3_register *src_reg) -{ - return !(src_reg->flags & IR3_REG_SHARED) || - dst_instr->block->loop_id == src_instr->block->loop_id; -} - /** * Handle cp for a given src register. This additionally handles * the cases of collapsing immedate/const (which replace the src @@ -338,9 +322,6 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr, struct ir3_register *src_reg = src->srcs[0]; unsigned new_flags = reg->flags; - if (!is_valid_shared_copy(instr, src, src_reg)) - return false; - combine_flags(&new_flags, src); if (ir3_valid_flags(instr, n, new_flags)) { @@ -366,9 +347,6 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr, struct ir3_register *src_reg = src->srcs[0]; unsigned new_flags = reg->flags; - if (!is_valid_shared_copy(instr, src, src_reg)) - return false; - if (src_reg->flags & IR3_REG_ARRAY) return false;