[PATCH] D17475: MachineCopyPropagation: Catch copies of the form A<-B; A<-B

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 25 18:51:15 PST 2016

MatzeB added a comment.

In http://reviews.llvm.org/D17475#362150, @junbuml wrote:

> This looks good to me, assuming other reviewers are OK with adding isConstantPhysReg() in a follow-up patch.

I'm not convinced that isConstantPhysReg() is the answer. This function currently simply checks whether there is more than one definition for a register. This still does not allow us to assume the same value for arbitrary reserved registers IMO (think of the PC register on ARM) it would also fail if we have more than 1 write of the zero registers (not sure about ARM but on sparc it is common to write to the zero register). See also the llvm-dev I just posted about unallocatable/reserved registers.



More information about the llvm-commits mailing list