From eb0001bf2bd80dce2824d1e9650049dac37df6b7 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 19 Apr 2022 13:59:31 -0400 Subject: [PATCH] pan/bi: Rename bi_block->name to bi_block->index This is consistent with nir_block and (IMO) less confusing. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_layout.c | 2 +- src/panfrost/bifrost/bi_print.c | 6 +++--- src/panfrost/bifrost/bi_printer.c.py | 2 +- src/panfrost/bifrost/bifrost_compile.c | 2 +- src/panfrost/bifrost/compiler.h | 2 +- src/panfrost/bifrost/valhall/va_pack.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/panfrost/bifrost/bi_layout.c b/src/panfrost/bifrost/bi_layout.c index 0942de0..7c034cb 100644 --- a/src/panfrost/bifrost/bi_layout.c +++ b/src/panfrost/bifrost/bi_layout.c @@ -95,7 +95,7 @@ bi_block_offset(bi_context *ctx, bi_clause *start, bi_block *target) /* Determine if the block we're branching to is strictly greater in * source order */ - bool forwards = target->name > start->block->name; + bool forwards = target->index > start->block->index; if (forwards) { /* We have to jump through this block from the start of this diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 801ea67..85f71f5 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -158,7 +158,7 @@ bi_print_block(bi_block *block, FILE *fp) fprintf(fp, "\n"); } - fprintf(fp, "block%u {\n", block->name); + fprintf(fp, "block%u {\n", block->index); if (block->scheduled) { bi_foreach_clause_in_block(block, clause) @@ -174,14 +174,14 @@ bi_print_block(bi_block *block, FILE *fp) fprintf(fp, " -> "); bi_foreach_successor((block), succ) - fprintf(fp, "block%u ", succ->name); + fprintf(fp, "block%u ", succ->index); } if (block->predecessors->entries) { fprintf(fp, " from"); bi_foreach_predecessor(block, pred) - fprintf(fp, " block%u", pred->name); + fprintf(fp, " block%u", pred->index); } if (block->scheduled) { diff --git a/src/panfrost/bifrost/bi_printer.c.py b/src/panfrost/bifrost/bi_printer.c.py index c193fc7..418d26d 100644 --- a/src/panfrost/bifrost/bi_printer.c.py +++ b/src/panfrost/bifrost/bi_printer.c.py @@ -198,7 +198,7 @@ bi_print_instr(const bi_instr *I, FILE *fp) } if (I->branch_target) - fprintf(fp, " -> block%u", I->branch_target->name); + fprintf(fp, " -> block%u", I->branch_target->index); fputs("\\n", fp); diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 7643690..f7b6f29 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -4560,7 +4560,7 @@ bi_compile_variant_nir(nir_shader *nir, bi_foreach_block(ctx, block) { /* Name blocks now that we're done emitting so the order is * consistent */ - block->name = block_source_count++; + block->index = block_source_count++; } bi_validate(ctx, "NIR -> BIR"); diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 98ec840..a143dd8 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -658,7 +658,7 @@ typedef struct bi_block { struct list_head instructions; /* Index of the block in source order */ - unsigned name; + unsigned index; /* Control flow graph */ struct bi_block *successors[2]; diff --git a/src/panfrost/bifrost/valhall/va_pack.c b/src/panfrost/bifrost/valhall/va_pack.c index 6736057..fe8986f 100644 --- a/src/panfrost/bifrost/valhall/va_pack.c +++ b/src/panfrost/bifrost/valhall/va_pack.c @@ -844,7 +844,7 @@ va_lower_branch_target(bi_context *ctx, bi_block *start, bi_instr *I) signed offset = 0; /* Determine if the target block is strictly greater in source order */ - bool forwards = target->name > start->name; + bool forwards = target->index > start->index; if (forwards) { /* We have to jump through this block */ -- 2.7.4