summaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_liveness.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-01-02 12:27:59 -0500
committerAlyssa Rosenzweig <[email protected]>2020-01-02 15:20:55 -0500
commit5bc62af2a08c96f2e90740bbd1503d26efa2b669 (patch)
tree8bfa19823b71fac4bc60d08ddbe8be3f8565cbfa /src/panfrost/midgard/midgard_liveness.c
parentdb879b034a131694a819da16ddcb680cd81597a8 (diff)
pan/midgard: Generate MRT writeout loops
They need a very particular form; the naive way we did before is not sufficient in practice, it doesn't look like. So let's follow the rough structure of the blob's writeout since this is fixed code anyway. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_liveness.c')
-rw-r--r--src/panfrost/midgard/midgard_liveness.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_liveness.c b/src/panfrost/midgard/midgard_liveness.c
index 8627e01fa74..b1b2f311ffa 100644
--- a/src/panfrost/midgard/midgard_liveness.c
+++ b/src/panfrost/midgard/midgard_liveness.c
@@ -153,14 +153,20 @@ mir_compute_liveness(compiler_context *ctx)
/* If we made progress, we need to process the predecessors */
- if (progress || (blk == exit) || blk->epilogue) {
+ if (progress || !blk->visited) {
mir_foreach_predecessor(blk, pred)
_mesa_set_add(work_list, pred);
}
+
+ blk->visited = true;
} while((cur = _mesa_set_next_entry(work_list, NULL)) != NULL);
/* Liveness is now valid */
ctx->metadata |= MIDGARD_METADATA_LIVENESS;
+
+ mir_foreach_block(ctx, block) {
+ block->visited = false;
+ }
}
/* Once liveness data is no longer valid, call this */