Please review this patch that allows the RegisterCoalescer to join "non-flipped" range pairs with a physical destination register. This allows the RegisterCoalescer to remove copies like this:
<vreg> = something (maybe a load, for example)
... (things that don't use PHYSREG)
PHYSREG = COPY <vreg>
(with all of the restrictions normally applied by the RegisterCoalescer: having compatible register classes, etc. )
Currently, RegisterCoalescer handles only the opposite case (copying *from* a physical register). I don't handle the problem fully here, but try to get the common case where there is only one use of <vreg> (the COPY).
One thing that is not clear to me: Do I need to do anything special to update the 'dead def' live range corresponding to the updated PHYSREG?
Once this functionality is committed, I'll commit a change to the PowerPC backend to make this pattern *very* common, and so it is important that the RegisterCoalescer can eliminate it when that's profitable.