[v1] panfrost/midgard: Skip liveness analysis for instructions without dest

Submitted by Tomeu Vizoso on May 2, 2019, 9:48 a.m.

Details

Message ID 20190502094848.30714-1-tomeu.vizoso@collabora.com
State New
Headers show
Series "panfrost/midgard: Skip liveness analysis for instructions without dest" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Tomeu Vizoso May 2, 2019, 9:48 a.m.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index d4d26b9a25e9..f5d8c3e0f2c1 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -2108,6 +2108,7 @@  allocate_registers(compiler_context *ctx)
         mir_foreach_block(ctx, block) {
                 mir_foreach_instr_in_block(block, ins) {
                         if (ins->compact_branch) continue;
+                        if (ins->ssa_args.dest < 0) continue;
 
                         if (ins->ssa_args.dest < SSA_FIXED_MINIMUM) {
                                 /* If this destination is not yet live, it is now since we just wrote it */

Comments

Just for future reader's reference, could you add a comment above this
line:

	/* This skips store_vary instructions, which are not yet SSA */

> +                        if (ins->ssa_args.dest < 0) continue;

With that small change, Reviewed-by AR :)