diff options
author | Jason Ekstrand <[email protected]> | 2014-11-13 21:19:28 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-01-15 07:20:20 -0800 |
commit | 0057dfd673c62741bd9eba34759f3539940068a2 (patch) | |
tree | 6bd84d8edf86393f18b511c7cc5dada280ab64d1 /src/glsl/Makefile.sources | |
parent | a94d1c248153a50923d8639123f956ec1961a837 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/glsl/Makefile.sources')
-rw-r--r-- | src/glsl/Makefile.sources | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources index 12c1d8310b7..201330db269 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 \ |