glsl: Stop tree grafting if a variable is overwritten as an 'out' param.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 22 Sep 2011 22:04:56 +0000 (15:04 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 18 Oct 2011 19:24:48 +0000 (12:24 -0700)
commit3c22e3516527ccb83f2667abfa0e6518c5938df8
treedc3207e331e99831067e88375a75daedf320bf96
parentf8377b411dfe3c879eaab11bb86f509178796bd1
glsl: Stop tree grafting if a variable is overwritten as an 'out' param.

While reviewing some compiler cleanups I'd sent out, Paul noticed that
tree grafting wasn't taking "out" parameters into account.

Further investigation revealed that it isn't strictly necessary: ir_call
ends basic blocks, and tree grafting currently only operates on basic
blocks.  So calls already kill grafts.

However, just to be safe, this patch makes "out" parameters explicitly
kill grafts.  Paul and I both prefer this.  It's a bit clearer.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/opt_tree_grafting.cpp