r600/sfn: Don't copy propagate indirect loads to more than one dest
Propagating the indirect load to more instructions would result in more address load instructions. This would (a) remove the advantage of eliminating one move, and (b) introduce more latency, because between address load and use two cycles must pass. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21357>
This commit is contained in:
@@ -360,6 +360,16 @@ CopyPropFwdVisitor::visit(AluInstr *instr)
|
||||
auto src = instr->psrc(0);
|
||||
auto dest = instr->dest();
|
||||
|
||||
/* Don't propagate an indirect load to more than one
|
||||
* instruction, because we may have to split the address loads
|
||||
* creating more instructions */
|
||||
if (dest->uses().size() > 1) {
|
||||
auto [addr, is_for_dest, index] = instr->indirect_addr();
|
||||
if (addr && !is_for_dest)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
auto ii = dest->uses().begin();
|
||||
auto ie = dest->uses().end();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user