summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_sweep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_sweep.c')
-rw-r--r--src/compiler/nir/nir_sweep.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_sweep.c b/src/compiler/nir/nir_sweep.c
index aab641388db..b6b56aa078c 100644
--- a/src/compiler/nir/nir_sweep.c
+++ b/src/compiler/nir/nir_sweep.c
@@ -63,6 +63,15 @@ sweep_block(nir_shader *nir, nir_block *block)
{
ralloc_steal(nir, block);
+ /* sweep_impl will mark all metadata invalid. We can safely release all of
+ * this here.
+ */
+ ralloc_free(block->live_in);
+ block->live_in = NULL;
+
+ ralloc_free(block->live_out);
+ block->live_out = NULL;
+
nir_foreach_instr(instr, block) {
ralloc_steal(nir, instr);