[Mesa-dev] [PATCH 09/15] i965/fs: Use the COPY set in the calculation for liveout.

Kenneth Graunke kenneth at whitecape.org
Mon Aug 12 13:11:29 PDT 2013


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 at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
index 2ab7734..fd726e0 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -196,7 +196,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;
-- 
1.8.3.4



More information about the mesa-dev mailing list