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