nir: define behavior of nir_op_bfm and nir_op_u/ibfe according to SM5 spec.
[mesa.git] / src / compiler / nir / nir_sweep.c
index aab641388dbcf40df906533e2749870da5b4aefe..56b7a267f64ab8675482c40fe7e745ec1cb386c8 100644 (file)
@@ -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);
 
@@ -160,7 +169,6 @@ nir_sweep(nir_shader *nir)
    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) {