diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-05 10:28:13 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-07 00:37:39 +0000 |
commit | 5c7ee8a9746b1ae7d852b1ae3e5408378547c156 (patch) | |
tree | dbf3cda68fceda32ac8ba2c1fbbba4029ba4a059 /src | |
parent | 83c4562503cc96ee04d873ee5c814e43b9e61b56 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4097>
Diffstat (limited to 'src')
-rw-r--r-- | src/panfrost/bifrost/bi_print.c | 14 |
1 files changed, 9 insertions, 5 deletions
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 |