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 <kenneth@whitecape.org>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
Kenneth Graunke 2013-08-09 18:44:25 -07:00
parent 70b02a7fac
commit 72f2249c11

View file

@ -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);