From 695a2e2ffa5faa7b303ca819dcb2e2922dfce5ab Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 7 Nov 2016 10:16:45 -0800 Subject: [PATCH] vc4: Print a reg pressure estimate in our reg allocation failure dump. --- src/gallium/drivers/vc4/vc4_qir.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index 446af66affd..a34eccf5091 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -381,6 +381,7 @@ void qir_dump(struct vc4_compile *c) { int ip = 0; + int pressure = 0; qir_for_each_block(block, c) { fprintf(stderr, "BLOCK %d:\n", block->index); @@ -388,6 +389,8 @@ qir_dump(struct vc4_compile *c) if (c->temp_start) { bool first = true; + fprintf(stderr, "%3d ", pressure); + for (int i = 0; i < c->num_temps; i++) { if (c->temp_start[i] != ip) continue; @@ -398,6 +401,7 @@ qir_dump(struct vc4_compile *c) fprintf(stderr, ", "); } fprintf(stderr, "S%4d", i); + pressure++; } if (first) @@ -419,6 +423,7 @@ qir_dump(struct vc4_compile *c) fprintf(stderr, ", "); } fprintf(stderr, "E%4d", i); + pressure--; } if (first) -- 2.30.2