i965: Add a pass to remove dead control flow.
authorMatt Turner <mattst88@gmail.com>
Wed, 30 Oct 2013 17:32:12 +0000 (10:32 -0700)
committerMatt Turner <mattst88@gmail.com>
Wed, 20 Nov 2013 23:04:53 +0000 (15:04 -0800)
commita97cd0f4d7902965d5173f4bcbf2ad27c0eb5d12
treef13be7d77a5908054bb89c5793648bf94feb045e
parentb63d6aae55c06bf7cb6b9ed1370634bc120ed045
i965: Add a pass to remove dead control flow.

Removes IF/ENDIF and IF/ELSE/ENDIF with no intervening instructions.

total instructions in shared programs: 1360393 -> 1360387 (-0.00%)
instructions in affected programs:     157 -> 151 (-3.82%)

(no change in vertex shaders)

Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/Makefile.sources
src/mesa/drivers/dri/i965/brw_dead_control_flow.cpp [new file with mode: 0644]
src/mesa/drivers/dri/i965/brw_dead_control_flow.h [new file with mode: 0644]
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_vec4.cpp