summaryrefslogtreecommitdiffstats
path: root/src/glsl/Makefile.sources
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2014-11-13 21:19:28 -0800
committerJason Ekstrand <jason.ekstrand@intel.com>2015-01-15 07:20:20 -0800
commit0057dfd673c62741bd9eba34759f3539940068a2 (patch)
tree6bd84d8edf86393f18b511c7cc5dada280ab64d1 /src/glsl/Makefile.sources
parenta94d1c248153a50923d8639123f956ec1961a837 (diff)
downloadexternal_mesa3d-0057dfd673c62741bd9eba34759f3539940068a2.zip
external_mesa3d-0057dfd673c62741bd9eba34759f3539940068a2.tar.gz
external_mesa3d-0057dfd673c62741bd9eba34759f3539940068a2.tar.bz2
nir: Add an expression matching framework
This framework provides a simple way to do simple search-and-replace operations on NIR code. The nir_search.h header provides four simple data structures for representing expressions: nir_value and four subtypes: nir_variable, nir_constant, and nir_expression. An expression tree can then be represented by nesting these data structures as needed. The nir_replace_instr function takes an instruction, an expression, and a value; if the instruction matches the expression, it is replaced with a new chain of instructions to generate the given replacement value. The framework keeps track of swizzles on sources and automatically generates the currect swizzles for the replacement value. Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/glsl/Makefile.sources')
-rw-r--r--src/glsl/Makefile.sources2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources
index 12c1d83..201330d 100644
--- a/src/glsl/Makefile.sources
+++ b/src/glsl/Makefile.sources
@@ -41,6 +41,8 @@ NIR_FILES = \
$(GLSL_SRCDIR)/nir/nir_opt_peephole_select.c \
$(GLSL_SRCDIR)/nir/nir_print.c \
$(GLSL_SRCDIR)/nir/nir_remove_dead_variables.c \
+ $(GLSL_SRCDIR)/nir/nir_search.c \
+ $(GLSL_SRCDIR)/nir/nir_search.h \
$(GLSL_SRCDIR)/nir/nir_split_var_copies.c \
$(GLSL_SRCDIR)/nir/nir_to_ssa.c \
$(GLSL_SRCDIR)/nir/nir_validate.c \