panfrost: add lcra_free() to free lcra state
Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
5b6108834b
commit
12e393bacf
|
@ -66,6 +66,22 @@ lcra_alloc_equations(
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
lcra_free(struct lcra_state *l)
|
||||||
|
{
|
||||||
|
free(l->alignment);
|
||||||
|
free(l->linear);
|
||||||
|
free(l->modulus);
|
||||||
|
free(l->class);
|
||||||
|
free(l->class_start);
|
||||||
|
free(l->class_disjoint);
|
||||||
|
free(l->class_size);
|
||||||
|
free(l->spill_cost);
|
||||||
|
free(l->solutions);
|
||||||
|
|
||||||
|
free(l);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
lcra_set_alignment(struct lcra_state *l, unsigned node, unsigned align_log2)
|
lcra_set_alignment(struct lcra_state *l, unsigned node, unsigned align_log2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,6 +85,8 @@ lcra_alloc_equations(
|
||||||
unsigned min_alignment, unsigned max_alignment,
|
unsigned min_alignment, unsigned max_alignment,
|
||||||
unsigned bound, unsigned class_count);
|
unsigned bound, unsigned class_count);
|
||||||
|
|
||||||
|
void
|
||||||
|
lcra_free(struct lcra_state *l);
|
||||||
|
|
||||||
void
|
void
|
||||||
lcra_set_disjoint_class(struct lcra_state *l, unsigned c1, unsigned c2);
|
lcra_set_disjoint_class(struct lcra_state *l, unsigned c1, unsigned c2);
|
||||||
|
|
|
@ -1427,7 +1427,11 @@ schedule_program(compiler_context *ctx)
|
||||||
mir_squeeze_index(ctx);
|
mir_squeeze_index(ctx);
|
||||||
mir_invalidate_liveness(ctx);
|
mir_invalidate_liveness(ctx);
|
||||||
|
|
||||||
l = NULL;
|
if (l) {
|
||||||
|
lcra_free(l);
|
||||||
|
l = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
l = allocate_registers(ctx, &spilled);
|
l = allocate_registers(ctx, &spilled);
|
||||||
} while(spilled && ((iter_count--) > 0));
|
} while(spilled && ((iter_count--) > 0));
|
||||||
|
|
||||||
|
@ -1442,4 +1446,6 @@ schedule_program(compiler_context *ctx)
|
||||||
ctx->tls_size = spill_count * 16;
|
ctx->tls_size = spill_count * 16;
|
||||||
|
|
||||||
install_registers(ctx, l);
|
install_registers(ctx, l);
|
||||||
|
|
||||||
|
lcra_free(l);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue