i965: Make DCE explicitly not eliminate any control flow instructions.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Jan 2017 03:15:50 +0000 (19:15 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Jan 2017 05:44:29 +0000 (21:44 -0800)
commitbe5f53e769deb936509efd6f0576b15b7a5432b9
treeff0d3ce2d8469f5a264ed9da2a8e3e925e77373f
parentaac562f112ea9194b416c97336dcbbd3c1da812b
i965: Make DCE explicitly not eliminate any control flow instructions.

According to Matt, the dead code pass explicitly avoided IF and WHILE
because on Sandybridge, these could have conditional modifiers and
null destination registers.  Normally, those instructions use BAD_FILE
for the destination register.  Nowadays, we don't do that anymore, so
we could technically drop these checks.

However, it's clearer to explicitly leave control flow instructions
alone, so change it to the more generic !inst->is_control_flow().

This should have no actual change.

[This patch implements review feedback from Curro and Matt.]

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp