mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 06:40:32 +01:00
pan/bi: Add bi_print_block
Almost there... Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
This commit is contained in:
parent
c316d1553b
commit
c152d4c835
2 changed files with 31 additions and 0 deletions
|
|
@ -385,3 +385,33 @@ bi_print_clause(bi_clause *clause, FILE *fp)
|
|||
fprintf(fp, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
bi_print_block(bi_block *block, FILE *fp)
|
||||
{
|
||||
fprintf(fp, "block%u {\n", block->name);
|
||||
|
||||
if (block->scheduled) {
|
||||
bi_foreach_clause_in_block(block, clause)
|
||||
bi_print_clause(clause, fp);
|
||||
} else {
|
||||
bi_foreach_instr_in_block(block, ins)
|
||||
bi_print_instruction(ins, fp);
|
||||
}
|
||||
|
||||
if (block->successors[0]) {
|
||||
fprintf(fp, " -> ");
|
||||
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(block->successors); ++i) {
|
||||
if (block->successors[i])
|
||||
fprintf(fp, "block%u", block->successors[i]->name);
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(fp, " from ");
|
||||
|
||||
bi_foreach_predecessor(block, pred)
|
||||
fprintf(fp, "block%u ", pred->name);
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,5 +41,6 @@ const char * bi_ldst_type_name(enum bifrost_ldst_type type);
|
|||
void bi_print_instruction(bi_instruction *ins, FILE *fp);
|
||||
void bi_print_bundle(bi_bundle *bundle, FILE *fp);
|
||||
void bi_print_clause(bi_clause *clause, FILE *fp);
|
||||
void bi_print_block(bi_block *block, FILE *fp);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue