aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2019-07-19 21:21:35 (GMT)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2019-07-22 15:20:34 (GMT)
commita08e9511e34e87b445475249df329f9c3e4c4e99 (patch)
treec74c0afe9795d66f491b9e7cdb9816d9c5c68aa1
parent1aa556de2e59ae7c72df8c5de2d5a555b2026352 (diff)
downloadexternal_mesa3d-a08e9511e34e87b445475249df329f9c3e4c4e99.zip
external_mesa3d-a08e9511e34e87b445475249df329f9c3e4c4e99.tar.gz
external_mesa3d-a08e9511e34e87b445475249df329f9c3e4c4e99.tar.bz2
pan/midgard; Dump successor graph when printing MIR
We just use the pointers of the midgard_block*, which is crude, but it gets the point across and will help debug successor related issues. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
-rw-r--r--src/panfrost/midgard/midgard_print.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c
index 6e10429..a950c13 100644
--- a/src/panfrost/midgard/midgard_print.c
+++ b/src/panfrost/midgard/midgard_print.c
@@ -106,13 +106,23 @@ mir_print_instruction(midgard_instruction *ins)
void
mir_print_block(midgard_block *block)
{
- printf("{\n");
+ printf("%p: {\n", block);
mir_foreach_instr_in_block(block, ins) {
mir_print_instruction(ins);
}
- printf("}\n");
+ printf("}");
+
+ if (block->nr_successors) {
+ printf(" -> ");
+ for (unsigned i = 0; i < block->nr_successors; ++i) {
+ printf("%p%s", block->successors[i],
+ (i + 1) != block->nr_successors ? ", " : "");
+ }
+ }
+
+ printf("\n\n");
}
void