diff options
author | Emma Anholt <emma@anholt.net> | 2021-07-07 10:22:21 -0700 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-09-14 17:53:06 +0000 |
commit | d1a2870f782fd1ee75b2d6e179a7fc06e52a961d (patch) | |
tree | 9b7150ea31a8b05ba7025cc88937d297d467c6f0 /src/compiler/nir/nir_clone.c | |
parent | 22788d68eb60f049c6f7ff4a1da77d334f272886 (diff) | |
download | mesa-d1a2870f782fd1ee75b2d6e179a7fc06e52a961d.tar.gz |
nir: Add all allocated instructions to a GC list.
Right now we're using ralloc to GC our NIR instructions, but ralloc has
significant overhead for its recursive nature so it would be nice to use a
simpler mechanism for GCing instructions.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11776>
Diffstat (limited to 'src/compiler/nir/nir_clone.c')
-rw-r--r-- | src/compiler/nir/nir_clone.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_clone.c b/src/compiler/nir/nir_clone.c index db46d405020..d1bd0e5fa3d 100644 --- a/src/compiler/nir/nir_clone.c +++ b/src/compiler/nir/nir_clone.c @@ -798,6 +798,8 @@ nir_shader_replace(nir_shader *dst, nir_shader *src) /* We have to move all the linked lists over separately because we need the * pointers in the list elements to point to the lists in dst and not src. */ + list_replace(&src->gc_list, &dst->gc_list); + list_inithead(&src->gc_list); exec_list_move_nodes_to(&src->variables, &dst->variables); /* Now move the functions over. This takes a tiny bit more work */ |