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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user