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 /docs/egl.html | |
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 'docs/egl.html')
0 files changed, 0 insertions, 0 deletions