nir: Free liveness info when invalidating metadata
Liveness info can be huge, since with larger shaders it essentially grows quadratically (linear increase in number of SSA defs * linear increase in blocks). Freeing liveness info early helps somewhat mitigate memory usage here. Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29577>
This commit is contained in:
committed by
Marge Bot
parent
9b1f31a615
commit
ebbb18aeb6
@@ -47,15 +47,6 @@ 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) {
|
||||
gc_mark_live(nir->gctx, instr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user