nir/algebraic: Add support for unsized conversion opcodes
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 7 Nov 2018 21:40:02 +0000 (15:40 -0600)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 5 Dec 2018 21:02:56 +0000 (15:02 -0600)
commit05af952a1102b47e11b41991e7cee1e557279a96
treef72a0aedb628dcaf3aeb16da5345a9d8811c96bb
parent4925290ab1771d075c994ac23e0c0a3c19d3a50e
nir/algebraic: Add support for unsized conversion opcodes

All conversion opcodes require a destination size but this makes
constructing certain algebraic expressions rather cumbersome.  This
commit adds support to nir_search and nir_algebraic for writing
conversion opcodes without a size.  These meta-opcodes match any
conversion of that type regardless of destination size and the size gets
inferred from the sizes of the things being matched or from other
opcodes in the expression.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/compiler/nir/nir_algebraic.py
src/compiler/nir/nir_search.c
src/compiler/nir/nir_search.h