pan/bi: Print branch target
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 5 Mar 2020 21:33:09 +0000 (16:33 -0500)
committerMarge Bot <eric+marge@anholt.net>
Sat, 7 Mar 2020 00:37:39 +0000 (00:37 +0000)
...if it's present, anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4097>

src/panfrost/bifrost/bi_print.c

index 68cbbedbb8286fd28d5b231c645f1090c02425aa..9c9f6770285ab58a39cbb2e0c2269c32cf6fe277 100644 (file)
@@ -328,6 +328,13 @@ bi_print_instruction(bi_instruction *ins, FILE *fp)
                         fprintf(fp, ", ");
         }
 
+        if (ins->type == BI_BRANCH) {
+                if (ins->branch.target)
+                        fprintf(fp, "-> block%u", ins->branch.target->name);
+                else
+                        fprintf(fp, "-> blockhole");
+        }
+
         fprintf(fp, "\n");
 }