i965/fs: Use the COPY set in the calculation for liveout.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 10 Aug 2013 01:36:54 +0000 (18:36 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 19 Aug 2013 18:29:24 +0000 (11:29 -0700)
According to page 360 of the textbook, the proper formula for liveout
is:

CPout(n) = COPY(i) union (CPin(i) - KILL(i))

Previously, we omitted COPY.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp

index 0078c871c5d6ae3fa60230188b814b7251252352..9ffb64deb85a8670dc8a8c4ab3c2f131ea8c2ab8 100644 (file)
@@ -188,7 +188,8 @@ fs_copy_prop_dataflow::run()
          for (int i = 0; i < bitset_words; i++) {
             const BITSET_WORD old_liveout = bd[b].liveout[i];
 
-            bd[b].liveout[i] |= bd[b].livein[i] & ~bd[b].kill[i];
+            bd[b].liveout[i] |=
+               bd[b].copy[i] | (bd[b].livein[i] & ~bd[b].kill[i]);
 
             if (old_liveout != bd[b].liveout[i])
                progress = true;