[RFC] Eliminate spill copies in MachineCopyPropagation

Hi all,
I recently posted ⚙ D122118 [MachineCopyPropagation] Eliminate spillage copies that might be caused by eviction chain to fold copies like

r0 = COPY r1                                                                                                                                                                                 
r1 = COPY r2                                                                                                                                                                                 
r2 = COPY r3                                                                                                                                                                                 
r3 = COPY r4                                                                                                                                                                                 
<def-use r4>                                                                                                                                                                                 
r4 = COPY r3                                                                                                                                                                                 
r3 = COPY r2                                                                                                                                                                                 
r2 = COPY r1                                                                                                                                                                                 
r1 = COPY r0

into

r0 = COPY r1                                                                                                                                                                              
r1 = COPY r4                                                                                                                                                                              
<def-use r4>                                                                                                                                                                              
r4 = COPY r1                                                                                                                                                                              
r1 = COPY r0

This transformation can be useful after -consider-local-interval-cost was removed in ⚙ D121128 [regalloc] Remove -consider-local-interval-cost. The rationale of performing this transformation was discussed in ⚙ D98232 [regalloc] Ensure Query::collectInterferringVregs is called before interval iteration.

I also posted compile-time stats number in ⚙ D122118 [MachineCopyPropagation] Eliminate spillage copies that might be caused by eviction chain, the impact is not significant. Currently I only enable it on PowerPC by default, since some of our internal workload ever used -consider-local-interval-cost. I see this transformation also affects some test in RISCV and Thumb if enabling it by default, changes can be found in ⚙ D122118 [MachineCopyPropagation] Eliminate spillage copies that might be caused by eviction chain.

Please let me know if you are interested in this optimization.

Cheers,
Kai