Mesa (main): pan/mdg: Distinguish SSA vs reg when printing IR

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 1 19:43:04 UTC 2022


Module: Mesa
Branch: main
Commit: a099834b97e5561dca493b7c6b2368637c0ca9d7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a099834b97e5561dca493b7c6b2368637c0ca9d7

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue May 31 09:08:23 2022 -0400

pan/mdg: Distinguish SSA vs reg when printing IR

This makes it easy to match the printed IR with the indices in the NIR.

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

---

 src/panfrost/midgard/midgard_print.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c
index a053b803d0a..15a9fd62a54 100644
--- a/src/panfrost/midgard/midgard_print.c
+++ b/src/panfrost/midgard/midgard_print.c
@@ -50,11 +50,13 @@ mir_print_index(int source)
 
                 /* TODO: Moving threshold */
                 if (reg > 16 && reg < 24)
-                        printf("u%d", 23 - reg);
+                        printf("U%d", 23 - reg);
                 else
-                        printf("r%d", reg);
+                        printf("R%d", reg);
+        } else if (source & PAN_IS_REG) {
+                printf("r%d", source >> 1);
         } else {
-                printf("%d", source);
+                printf("%d", source >> 1);
         }
 }
 



More information about the mesa-commit mailing list