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@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16279>
This commit is contained in:
parent
5a2dd4a44d
commit
eb0001bf2b
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue