i965/fs: Use NIR's scalarizing abilities and stop handling vectors
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 Dec 2014 22:44:19 +0000 (14:44 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 3 Feb 2015 20:33:11 +0000 (12:33 -0800)
commit112d738b91aac44c2509aafe68bdbf9ab74bb3c1
tree3d93ae28160c224266609bde7a88797bd53cb887
parentf2adcd36cb4f95d13bd820c3ba51451a9bf1df4f
i965/fs: Use NIR's scalarizing abilities and stop handling vectors

Now that we can scalarize with NIR, there's no need for all this code
anymore.  Let's get rid of it and just do scalar operations.

v2: run copy prop before lowering phi nodes

v3: Get rid of the "emit(...)->saturate = foo" pattern

v4: Run alu_to_scalar as an optimization pass

total instructions in shared programs: 5998321 -> 5974070 (-0.40%)
instructions in affected programs:     732075 -> 707824 (-3.31%)
helped:                                3137
HURT:                                  191
GAINED:                                18
LOST:                                  0

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp