[Mesa-dev] [PATCH 12/15] i965/fs: Skip the initial block when updating livein/liveout.

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


The starting block always has livein = 0 and liveout = copy.  Since we
start with real data, not estimates, there's no need to refine it with
the fixed point algorithm.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

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 bd73666..f5c8e4a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -213,6 +213,9 @@ fs_copy_prop_dataflow::run()
 
       /* Update liveout for all blocks. */
       for (int b = 0; b < cfg->num_blocks; b++) {
+         if (cfg->blocks[b]->parents.is_empty())
+            continue;
+
          for (int i = 0; i < bitset_words; i++) {
             const BITSET_WORD old_liveout = bd[b].liveout[i];
 
@@ -228,6 +231,9 @@ fs_copy_prop_dataflow::run()
        * blocks, it's live coming in to this block.
        */
       for (int b = 0; b < cfg->num_blocks; b++) {
+         if (cfg->blocks[b]->parents.is_empty())
+            continue;
+
          for (int i = 0; i < bitset_words; i++) {
             BITSET_WORD new_livein = ~bd[b].livein[i];
             foreach_list(block_node, &cfg->blocks[b]->parents) {
-- 
1.8.3.4



More information about the mesa-dev mailing list