This patch add a PPC-specific path after register allocation to eliminate redundancy related register copies among physical registers.
So far, we eliminate the following two types of redundant register copys.
- intra-BB redundant register copy
li Y, 0 li X, 0 (any instruction, not limited to li) mr X, Y => (erase mr) .. ..
- inter-BB partially redundant register copy
BB1-------- BB1-------- | .. | | .. | | mr Y, X | | (erase) | | .. | | .. | with ----------- with ----------- 1 pred / | 1 pred / | BB-------- | BB-------- BB--------- | BB--------- | .. | | | .. | => | mr Y, X | | | .. | | .. | | | .. | | .. | | | mr X, Y | ---------- | ---------- ----------- | ----------- | / with | / with BB2-------- 1 succ BB2-------- 1 succ | .. | | .. | | mr X, Y | | (erase) | | .. | | .. | ----------- -----------
s/copys/copies