i965/fs: Add a saturation propagation optimization pass.
authorMatt Turner <mattst88@gmail.com>
Thu, 12 Dec 2013 08:30:16 +0000 (00:30 -0800)
committerMatt Turner <mattst88@gmail.com>
Wed, 29 Jan 2014 01:47:41 +0000 (17:47 -0800)
commit947c828d5cbffe9640ac63103a6223112eeff27f
tree0f27f1123026e8bf9ca6fbac366020074988124b
parent39d7ec2c9a1b0213fa64c58fe3e1843119a62904
i965/fs: Add a saturation propagation optimization pass.

Transforms, for example,

mul     vgrf3, vgrf2, vgrf1
mov.sat vgrf4, vgrf3

into

mul.sat vgrf3, vgrf2, vgrf1
mov     vgrf4, vgrf3

which gives register_coalescing an opportunity to remove the MOV
instruction.

total instructions in shared programs: 1515039 -> 1504634 (-0.69%)
instructions in affected programs:     798586 -> 788181 (-1.30%)
GAINED:                                0
LOST:                                  4

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_saturate_propagation.cpp [new file with mode: 0644]