[PATCH] D20531: MachineCopyPropagation: remove some more copys when they are not needed
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 16:13:40 PDT 2016
qcolombet added a subscriber: qcolombet.
qcolombet added a comment.
Couple of comment:
> If a register use is defined by a COPY, and the COPY source reg could be used directly, use it instead if it seems that the COPY may be removable then.
That is not generally safe. In particular, if the definition is required by the ABI, you cannot eliminate that copy.
> What are your thoughts on this?
Improving MachineCopyPropagation to handle more cases seem reasonable to me.
For more complex cases, even if I believe the ReachingPhysDefs would help (BTW, I think it needs you to make some changes for faster convergence), it sounds more like we should improve our regalloc heuristic to not have to deal with those cases in the first place.
More information about the llvm-commits