This patch mainly do such transformation
$R0 = OP ... ... // No read/clobber of $R0 and $R1 $R1 = COPY $R0 // $R0 is killed
Replace $R0 with $R1 and remove the COPY, we have
$R1 = OP ...
This transformation can also expose more opportunities for existing copy elimination in MCP.
It seems to me that we could just reuse directly findAvailCopy and thus eliminate findCopyDefViaUnit.
The only difference would be the that we use a different iterator for the. forward and the backward case.