intel/fs: Merge copy prop dataflow loops
This is kept as a separate commit because the change looks like a lot more than it it. The order of the two loops is swapped, then the two loops are merged. Suggested-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25091>
This commit is contained in:
@@ -372,24 +372,6 @@ fs_copy_prop_dataflow::setup_initial_values()
|
||||
for (int i = 0; i < num_acp; i++)
|
||||
acp_table.add(acp[i]);
|
||||
|
||||
foreach_block (block, cfg) {
|
||||
foreach_inst_in_block(fs_inst, inst, block) {
|
||||
if (inst->dst.file != VGRF)
|
||||
continue;
|
||||
|
||||
for (auto iter = acp_table.find_by_dst(inst->dst.nr);
|
||||
iter != acp_table.end() && (*iter)->dst.nr == inst->dst.nr;
|
||||
++iter) {
|
||||
if (grf_regions_overlap(inst->dst, inst->size_written,
|
||||
(*iter)->dst, (*iter)->size_written)) {
|
||||
BITSET_SET(bd[block->num].kill, (*iter)->global_idx);
|
||||
if (inst->force_writemask_all && !(*iter)->force_writemask_all)
|
||||
BITSET_SET(bd[block->num].exec_mismatch, (*iter)->global_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach_block (block, cfg) {
|
||||
foreach_inst_in_block(fs_inst, inst, block) {
|
||||
if (inst->dst.file != VGRF &&
|
||||
@@ -406,6 +388,20 @@ fs_copy_prop_dataflow::setup_initial_values()
|
||||
BITSET_SET(bd[block->num].exec_mismatch, (*iter)->global_idx);
|
||||
}
|
||||
}
|
||||
|
||||
if (inst->dst.file != VGRF)
|
||||
continue;
|
||||
|
||||
for (auto iter = acp_table.find_by_dst(inst->dst.nr);
|
||||
iter != acp_table.end() && (*iter)->dst.nr == inst->dst.nr;
|
||||
++iter) {
|
||||
if (grf_regions_overlap(inst->dst, inst->size_written,
|
||||
(*iter)->dst, (*iter)->size_written)) {
|
||||
BITSET_SET(bd[block->num].kill, (*iter)->global_idx);
|
||||
if (inst->force_writemask_all && !(*iter)->force_writemask_all)
|
||||
BITSET_SET(bd[block->num].exec_mismatch, (*iter)->global_idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user