pan/bi: Improve register printing
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 21 Jul 2022 18:47:49 +0000 (14:47 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Sep 2022 16:03:23 +0000 (16:03 +0000)
Use "r0" style to denote machine registers, consistent with the assembly. Use
instead "nr0" for NIR registers so they don't collide. This reduces noise for
the average case (either register allocated or almost SSA).

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

src/panfrost/bifrost/bi_printer.c.py

index 024df69..b4cc3d8 100644 (file)
@@ -90,9 +90,9 @@ bi_print_index(FILE *fp, bi_index index)
     else if (index.type == BI_INDEX_PASS)
         fprintf(fp, "%s", bir_passthrough_name(index.value));
     else if (index.type == BI_INDEX_REGISTER)
-        fprintf(fp, "br%u", index.value);
-    else if (index.type == BI_INDEX_NORMAL && index.reg)
         fprintf(fp, "r%u", index.value);
+    else if (index.type == BI_INDEX_NORMAL && index.reg)
+        fprintf(fp, "nr%u", index.value);
     else if (index.type == BI_INDEX_NORMAL)
         fprintf(fp, "%u", index.value);
     else