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>
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