intel/fs: Simplify compute_start_end().

Now that we have moved the screening up, we can simplify the code.  No
change in shader-db steam performance, n=10.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24702>
This commit is contained in:
Emma Anholt
2023-06-14 10:46:44 -07:00
committed by Marge Bot
parent 2b01246f49
commit 5bd0750921

View File

@@ -236,23 +236,16 @@ fs_live_variables::compute_start_end()
{
foreach_block (block, cfg) {
struct block_data *bd = &block_data[block->num];
unsigned i;
for (int w = 0; w < bitset_words; w++) {
BITSET_WORD livedefin = bd->livein[w];
BITSET_WORD livedefout = bd->liveout[w];
BITSET_WORD livedefinout = livedefin | livedefout;
while (livedefinout) {
unsigned b = u_bit_scan(&livedefinout);
unsigned i = w * BITSET_WORDBITS + b;
if (livedefin & (1u << b)) {
start[i] = MIN2(start[i], block->start_ip);
end[i] = MAX2(end[i], block->start_ip);
}
if (livedefout & (1u << b)) {
start[i] = MIN2(start[i], block->end_ip);
end[i] = MAX2(end[i], block->end_ip);
}
}
BITSET_FOREACH_SET(i, bd->livein, (unsigned)num_vars) {
start[i] = MIN2(start[i], block->start_ip);
end[i] = MAX2(end[i], block->start_ip);
}
BITSET_FOREACH_SET(i, bd->liveout, (unsigned)num_vars) {
start[i] = MIN2(start[i], block->end_ip);
end[i] = MAX2(end[i], block->end_ip);
}
}
}