From: Alyssa Rosenzweig Date: Thu, 5 Mar 2020 15:28:13 +0000 (-0500) Subject: pan/bi: Improve block printing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c7ee8a9746b1ae7d852b1ae3e5408378547c156;p=mesa.git pan/bi: Improve block printing Skip predecessor printing if there are none and match a missing brace, also fixup the spacing. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 029b11d6e47..81b0f4aa0fc 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -399,21 +399,25 @@ bi_print_block(bi_block *block, FILE *fp) bi_print_instruction(ins, fp); } + fprintf(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, "block%u ", block->successors[i]->name); } } - fprintf(fp, " from "); + if (block->predecessors->entries) { + fprintf(fp, " from"); - bi_foreach_predecessor(block, pred) - fprintf(fp, "block%u ", pred->name); + bi_foreach_predecessor(block, pred) + fprintf(fp, " block%u", pred->name); + } - fprintf(fp, "\n"); + fprintf(fp, "\n\n"); } void