nir/algebraic: Flag inexact optimizations
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 17 Mar 2016 18:31:48 +0000 (11:31 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 23 Mar 2016 23:28:02 +0000 (16:28 -0700)
commit0dbda153aae548a4087f7364c9013583a076e0e9
tree9b3522cbbeccf0fb456a72e15748362c96bd793b
parented3a029e8088cb17af073c3b5f7444cb7e2f1cfb
nir/algebraic: Flag inexact optimizations

Many of our optimizations, while great for cutting shaders down to size,
aren't really precision-safe.  This commit tries to flag all of the
inexact floating-point optimizations so they don't get run on values that
are flagged "exact".  It's a bit conservative and maybe flags some safe
optimizations as unsafe but that's better than missing one.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/compiler/nir/nir_opt_algebraic.py