gallium/ntt: Fix leak of the per-instr liveness information.
authorEric Anholt <eric@anholt.net>
Mon, 11 Jan 2021 18:40:21 +0000 (10:40 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 12 Jan 2021 19:46:21 +0000 (19:46 +0000)
Fixes: 34cc6a804ec9 ("gallium: Add a nir-to-TGSI pass.")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8422>

src/gallium/auxiliary/nir/nir_to_tgsi.c

index 540e4be..5b3760e 100644 (file)
@@ -2193,6 +2193,9 @@ ntt_emit_impl(struct ntt_compile *c, nir_function_impl *impl)
 
    ntt_setup_registers(c, &impl->registers);
    ntt_emit_cf_list(c, &impl->body);
+
+   ralloc_free(c->liveness);
+   c->liveness = NULL;
 }
 
 static int