summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-01-21 11:13:44 -0500
committerRob Clark <[email protected]>2018-02-10 14:54:58 -0500
commit1b658533e1109b8ff9a6578a7eb4b390454e7876 (patch)
tree83afe8e16796ce107128557d10d2a80a4aeef535
parentac459a6f7f16dc8a999619fcf12f385ffdbbeda0 (diff)
freedreno/ir3: extend liverange of arrays
Use livein state of other blocks to extend liverange of arrays when they are still needed by successor blocks. Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_ra.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_ra.c b/src/gallium/drivers/freedreno/ir3/ir3_ra.c
index a22e4ca4918..9158aa53b7d 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_ra.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_ra.c
@@ -946,6 +946,17 @@ ra_add_interference(struct ir3_ra_ctx *ctx)
ctx->use[i] = MAX2(ctx->use[i], block->end_ip);
}
}
+
+ list_for_each_entry (struct ir3_array, arr, &ctx->ir->array_list, node) {
+ for (unsigned i = 0; i < arr->length; i++) {
+ if (BITSET_TEST(bd->livein, i + arr->base)) {
+ arr->start_ip = MIN2(arr->start_ip, block->start_ip);
+ }
+ if (BITSET_TEST(bd->livein, i + arr->base)) {
+ arr->end_ip = MAX2(arr->end_ip, block->end_ip);
+ }
+ }
+ }
}
/* need to fix things up to keep outputs live: */