aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/midgard/midgard_schedule.c
diff options
context:
space:
mode:
authorUrja Rannikko <[email protected]>2019-12-06 02:41:31 +0000
committerAlyssa Rosenzweig <[email protected]>2019-12-06 15:26:13 +0000
commit12e393bacf02e45bded02375aabc8329d42bb085 (patch)
treee7330cc6a20230a3ea00d25489d463993e1fcbb8 /src/panfrost/midgard/midgard_schedule.c
parent5b6108834bddd34846722440b40b459b81a95cd8 (diff)
panfrost: add lcra_free() to free lcra state
Signed-off-by: Urja Rannikko <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/midgard_schedule.c')
-rw-r--r--src/panfrost/midgard/midgard_schedule.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c
index 5e6ac15e539..dcf3764d688 100644
--- a/src/panfrost/midgard/midgard_schedule.c
+++ b/src/panfrost/midgard/midgard_schedule.c
@@ -1427,7 +1427,11 @@ schedule_program(compiler_context *ctx)
mir_squeeze_index(ctx);
mir_invalidate_liveness(ctx);
- l = NULL;
+ if (l) {
+ lcra_free(l);
+ l = NULL;
+ }
+
l = allocate_registers(ctx, &spilled);
} while(spilled && ((iter_count--) > 0));
@@ -1442,4 +1446,6 @@ schedule_program(compiler_context *ctx)
ctx->tls_size = spill_count * 16;
install_registers(ctx, l);
+
+ lcra_free(l);
}