nir: Add algebraic optimizations for exponential/logarithmic functions.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 22 Jan 2015 07:47:06 +0000 (23:47 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 23 Jan 2015 22:53:26 +0000 (14:53 -0800)
commitbbd60f6d7916d5758ba1b8d49cb0c37c1543199e
tree4ed805a6df4408f7eb3077fac0bf5efafed400ba
parent391fb32bbef3bdeb7bab78a4d3c5317a0153381e
nir: Add algebraic optimizations for exponential/logarithmic functions.

Most of these exist in the GLSL IR algebraic pass already.  However,
SSA allows us to find more instances of the patterns.

total NIR instructions in shared programs: 2015593 -> 2011430 (-0.21%)
NIR instructions in affected programs:     124189 -> 120026 (-3.35%)
helped:                                    604

total i965 instructions in shared programs: 6025505 -> 6018717 (-0.11%)
i965 instructions in affected programs:     261295 -> 254507 (-2.60%)
helped:                                     1295
HURT:                                       3

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/nir_opt_algebraic.py