mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 17:10:11 +01:00
nir: Free dead variables when removing them.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
f4e4491080
commit
f61b6c3e48
1 changed files with 3 additions and 1 deletions
|
|
@ -102,8 +102,10 @@ remove_dead_vars(struct exec_list *var_list, struct set *live)
|
|||
{
|
||||
foreach_list_typed_safe(nir_variable, var, node, var_list) {
|
||||
struct set_entry *entry = _mesa_set_search(live, var);
|
||||
if (entry == NULL)
|
||||
if (entry == NULL) {
|
||||
exec_node_remove(&var->node);
|
||||
ralloc_free(var);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue