intel: Count reads_remaining across all blocks.

We were zeroing it out per block, but it doesn't actually help to count
per block, since the question is "will scheduling this instruction free
the reg?".  Saves some memsetting, which was showing up high in the
profile (but not from this source).

No change on iris SKL shader-db.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23635>
This commit is contained in:
Emma Anholt
2023-06-13 12:50:02 -07:00
committed by Marge Bot
parent 12a47b84b7
commit 2ad865b219

View File

@@ -1916,14 +1916,16 @@ instruction_scheduler::run(cfg_t *cfg)
if (!post_reg_alloc)
setup_liveness(cfg);
if (reads_remaining) {
memset(reads_remaining, 0,
grf_count * sizeof(*reads_remaining));
memset(hw_reads_remaining, 0,
hw_reg_count * sizeof(*hw_reads_remaining));
memset(written, 0, grf_count * sizeof(*written));
}
foreach_block(block, cfg) {
if (reads_remaining) {
memset(reads_remaining, 0,
grf_count * sizeof(*reads_remaining));
memset(hw_reads_remaining, 0,
hw_reg_count * sizeof(*hw_reads_remaining));
memset(written, 0, grf_count * sizeof(*written));
foreach_inst_in_block(fs_inst, inst, block)
count_reads_remaining(inst);
}