summaryrefslogtreecommitdiffstats
path: root/src/glsl/Makefile.sources
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-03-27 19:50:29 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-04-07 14:34:14 -0700
commita10d493715cc3669a6e7647c5e514a386de886c0 (patch)
tree0da325c4516b49df0b66625c153f644f2507b3aa /src/glsl/Makefile.sources
parentde2014cf1e12826a53a1132f6d80c889f375b2e8 (diff)
downloadexternal_mesa3d-a10d493715cc3669a6e7647c5e514a386de886c0.zip
external_mesa3d-a10d493715cc3669a6e7647c5e514a386de886c0.tar.gz
external_mesa3d-a10d493715cc3669a6e7647c5e514a386de886c0.tar.bz2
nir: Implement a nir_sweep() pass.
This pass performs a mark and sweep pass over a nir_shader's associated memory - anything still connected to the program will be kept, and any dead memory we dropped on the floor will be freed. The expectation is that this will be called when finished building and optimizing the shader. However, it's also fine to call it earlier, and many times, to free up memory earlier. v2: (feedback from Jason Ekstrand) - Skip sweeping impl->start_block, as it's already in the CF list. - Don't sweep SSA defs (they're owned by their defining instruction) - Don't steal phi sources (they're owned by nir_phi_instr). - Don't steal tex->src (it's owned by the tex_inst itself) - Don't sweep dereference chains (top-level dereferences are owned by the instruction; sub-dereferences are owned by the parent deref). - Don't sweep sources and destinations (SSA defs are handled as part of the defining instruction, and registers are handled as part of function implementations). - Just steal instructions; don't walk them (no longer required). v3: (feedback from Jason Ekstrand) - Steal indirect sources from nir_src/nir_dest. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/glsl/Makefile.sources')
-rw-r--r--src/glsl/Makefile.sources1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index 9bdcb80..c471eca 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -59,6 +59,7 @@ NIR_FILES = \
nir/nir_search.c \
nir/nir_search.h \
nir/nir_split_var_copies.c \
+ nir/nir_sweep.c \
nir/nir_to_ssa.c \
nir/nir_types.h \
nir/nir_validate.c \