aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_print.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-30 11:03:44 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-30 15:50:27 -0700
commite5ba016d3ab1abb9f97e7864fbe5ab96e3877ee7 (patch)
tree407cea8030282a49d51d05d39a248a16572ebb15 /src/panfrost/midgard/midgard_print.c
parentf42cebdd8424d3e0896bd0ddc214b2996bd07a73 (diff)
pan/midgard: Print MIR by the bundle
After scheduling, we still have valid MIR, but we have additional bundling annotations which we would like to keep debug, so print these. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_print.c')
-rw-r--r--src/panfrost/midgard/midgard_print.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c
index 66b17be5bf6..50eb626f5e8 100644
--- a/src/panfrost/midgard/midgard_print.c
+++ b/src/panfrost/midgard/midgard_print.c
@@ -176,8 +176,17 @@ mir_print_block(midgard_block *block)
{
printf("block%d: {\n", block->source_id);
- mir_foreach_instr_in_block(block, ins) {
- mir_print_instruction(ins);
+ if (block->is_scheduled) {
+ mir_foreach_bundle_in_block(block, bundle) {
+ for (unsigned i = 0; i < bundle->instruction_count; ++i)
+ mir_print_instruction(bundle->instructions[i]);
+
+ printf("\n");
+ }
+ } else {
+ mir_foreach_instr_in_block(block, ins) {
+ mir_print_instruction(ins);
+ }
}
printf("}");