i965/fs: Reimplement dead_code_elimination().
authorMatt Turner <mattst88@gmail.com>
Sun, 13 Apr 2014 00:40:18 +0000 (17:40 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 15 Apr 2014 16:25:11 +0000 (09:25 -0700)
commitf34f39330bb41fb0a86930908de10353193a841d
tree60124c3f1f1955c558b7cfcdc394d072c1ca960b
parent596737ee91cc199a8edff5dc440736471e28f297
i965/fs: Reimplement dead_code_elimination().

total instructions in shared programs: 1653399 -> 1651790 (-0.10%)
instructions in affected programs:     92157 -> 90548 (-1.75%)
GAINED:                                2
LOST:                                  2

Also significantly reduces the number of optimization loop iterations:

total loop iterations in shared programs: 39724 -> 31651 (-20.32%)
loop iterations in affected programs:     21617 -> 13544 (-37.35%)

Including some great pathological cases, like 29 -> 3 in Strike Suit
Zero and 24 -> 3 in Dota2.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp [new file with mode: 0644]