From 7c694d53428503b09f1a0b6b286e86e3ec7b8720 Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Fri, 2 Aug 2024 09:42:34 +0200 Subject: [PATCH] bi: Add loop_header in bi_block Will be used for some DCE changes Signed-off-by: Mary Guillemard Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/compiler/bifrost_compile.c | 1 + src/panfrost/compiler/compiler.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/panfrost/compiler/bifrost_compile.c b/src/panfrost/compiler/bifrost_compile.c index 15e61c9dca9..0671e1a92b5 100644 --- a/src/panfrost/compiler/bifrost_compile.c +++ b/src/panfrost/compiler/bifrost_compile.c @@ -4056,6 +4056,7 @@ emit_loop(bi_context *ctx, nir_loop *nloop) ctx->continue_block = create_empty_block(ctx); ctx->break_block = create_empty_block(ctx); ctx->after_block = ctx->continue_block; + ctx->after_block->loop_header = true; /* Emit the body itself */ emit_cf_list(ctx, &nloop->body); diff --git a/src/panfrost/compiler/compiler.h b/src/panfrost/compiler/compiler.h index a1820bef041..4c708b4c041 100644 --- a/src/panfrost/compiler/compiler.h +++ b/src/panfrost/compiler/compiler.h @@ -713,6 +713,7 @@ typedef struct bi_block { struct bi_block *successors[2]; struct util_dynarray predecessors; bool unconditional_jumps; + bool loop_header; /* Per 32-bit word live masks for the block indexed by node */ uint8_t *live_in;