Commit 577bfba9 authored by Caio Marcelo de Oliveira Filho's avatar Caio Marcelo de Oliveira Filho Committed by Marge Bot

nir: Remove unused parameter in remove_dead_var_writes

And destroy the live set earlier in nir_remove_dead_variables.
Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
Part-of: <mesa/mesa!8133>
parent 617d8d37
......@@ -93,7 +93,7 @@ add_var_use_shader(nir_shader *shader, struct set *live, nir_variable_mode modes
}
static void
remove_dead_var_writes(nir_shader *shader, struct set *live)
remove_dead_var_writes(nir_shader *shader)
{
nir_foreach_function(function, shader) {
if (!function->impl)
......@@ -193,12 +193,14 @@ nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes,
}
}
_mesa_set_destroy(live, NULL);
nir_foreach_function(function, shader) {
if (!function->impl)
continue;
if (progress) {
remove_dead_var_writes(shader, live);
remove_dead_var_writes(shader);
nir_metadata_preserve(function->impl, nir_metadata_block_index |
nir_metadata_dominance);
} else {
......@@ -206,6 +208,5 @@ nir_remove_dead_variables(nir_shader *shader, nir_variable_mode modes,
}
}
_mesa_set_destroy(live, NULL);
return progress;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment