i965: Add a 'has_side_effects' back-end instruction predicate.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 20 Oct 2013 21:02:08 +0000 (14:02 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 4 Nov 2013 20:12:37 +0000 (12:12 -0800)
commit34fe051e215107dddbaae71e2edf15f88d839936
tree434dc2ff99387dcf328854cc76e1aa7270be0929
parentbf045bf9b409c47019fa7d9c859eaf8d50dd7032
i965: Add a 'has_side_effects' back-end instruction predicate.

This patch fixes the three dead code elimination passes and the
VEC4/FS instruction scheduling passes so they leave instructions with
side effects alone.

At some point it might be interesting to have the instruction
scheduler calculate the exact memory dependencies between atomic ops,
but they're rare enough that it seems unlikely that it will make any
practical difference.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_shader.h
src/mesa/drivers/dri/i965/brw_vec4.cpp