diff options
author | Kenneth Graunke <[email protected]> | 2013-08-09 18:44:25 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-08-19 11:29:24 -0700 |
commit | 72f2249c115a6bfafc809ebb4cb78c860279e41f (patch) | |
tree | 04c77e70faeadd4b89f1c117e31bd6aaf5526bb3 /src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | |
parent | 70b02a7facf88d5f17655be5e17f053d8531a278 (diff) |
i965/fs: Fix computation of livein.
Since the initial value for livein is an overestimation (0xffffffff),
it's extremely likely that it will shrink, which means we can't simply
OR in new bits - we need to fully recompute it based on the current
liveout values.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp | 13 |
1 files changed, 6 insertions, 7 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 90a3f4fbc0c..5ea8ea574ff 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp @@ -227,18 +227,17 @@ fs_copy_prop_dataflow::run() continue; for (int i = 0; i < bitset_words; i++) { - BITSET_WORD new_livein = ~bd[b].livein[i]; + const BITSET_WORD old_livein = bd[b].livein[i]; + + bd[b].livein[i] = ~0u; foreach_list(block_node, &cfg->blocks[b]->parents) { bblock_link *link = (bblock_link *)block_node; bblock_t *block = link->block; - new_livein &= bd[block->block_num].liveout[i]; - if (!new_livein) - break; + bd[b].livein[i] &= bd[block->block_num].liveout[i]; } - if (new_livein) { - bd[b].livein[i] |= new_livein; + + if (old_livein != bd[b].livein[i]) progress = true; - } } } } while (progress); |