{
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);
steal_list(nir, nir_variable, &nir->shared);
steal_list(nir, nir_variable, &nir->globals);
steal_list(nir, nir_variable, &nir->system_values);
- steal_list(nir, nir_register, &nir->registers);
/* Recurse into functions, stealing their contents back. */
foreach_list_typed(nir_function, func, node, &nir->functions) {