aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-09 18:47:19 -0700
committerKenneth Graunke <[email protected]>2013-08-19 11:29:24 -0700
commitd20b472d0a6b016e4827d0986a10df29277a3a5e (patch)
tree77cb275990b1bc94983e7943e647e7f4f7098b4c
parent731145c5794c2831a833778b0940c999273ec984 (diff)
i965/fs: Skip the initial block when updating livein/liveout.
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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp6
1 files changed, 6 insertions, 0 deletions
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 b5d698037ce..7662f6a3656 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
@@ -205,6 +205,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];
@@ -220,6 +223,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) {