mesa: Add partial constant propagation pass for Mesa IR
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 10 Feb 2011 23:48:27 +0000 (15:48 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 16 Aug 2011 21:38:39 +0000 (14:38 -0700)
commit54c48a95e6e0573886433f94ac83293876ffe03d
treecfac8d58d943e3d72a97b0df8f0afc2cf01a39e8
parentff2cfb8989cd79218dfe2cd8c3de20f1ca7418e6
mesa: Add partial constant propagation pass for Mesa IR

This cleans up some code generated by the IR-to-Mesa pass for i915.
In particular, some shaders involving arrays of constant matrices
result in really bad code.

v2: Silence several warnings from merging the gl_constant_value work.
Fix DP[23] folding.  Add support for a bunch more opcodes that appear
in piglit runs on i915.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/SConscript
src/mesa/program/prog_opt_constant_fold.c [new file with mode: 0644]
src/mesa/program/prog_optimize.c
src/mesa/program/prog_optimize.h
src/mesa/sources.mak