Mesa (main): pan/bi: Rename bi_block->name to bi_block->index
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue May 3 18:20:09 UTC 2022
Module: Mesa
Branch: main
Commit: eb0001bf2bd80dce2824d1e9650049dac37df6b7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb0001bf2bd80dce2824d1e9650049dac37df6b7
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Tue Apr 19 13:59:31 2022 -0400
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 <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16279>
---
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 0942de06187..7c034cb31be 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 801ea67b917..85f71f5e588 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 c193fc77848..418d26d37e7 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 76436907469..f7b6f2959c7 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 98ec840c4ca..a143dd84a39 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 6736057f0d8..fe8986f5382 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 */
More information about the mesa-commit
mailing list