On 02/16/2015 03:26 AM, Thomas Preud'homme wrote:
Hi,

The RTL cprop pass in GCC operates by doing a local constant/copy propagation 
first and then a global one. In the local one, if a constant cannot be 
propagated (eg. due to constraints of the destination instruction) a copy 
propagation is done instead. However, at the global level copy propagation is 
only tried if no constant can be propagated, ie. if a constant can be 
propagated but the constraints of the destination instruction forbids it, no 
copy propagation will be tried. This patch fixes this issue. This solves the 
redundant ldr problem in GCC32RM-439.

ChangeLog entries are as follows:

*** gcc/ChangeLog ***

2015-01-21 Thomas Preud'homme thomas.preudho...@arm.com

     * cprop.c (find_avail_set): Return up to two sets, one whose source is
     a register and one whose source is a constant.  Sets are returned in
     an array passed as parameter rather than as a return value.
     (cprop_insn): Use a do while loop rather than a goto.  Try each of the
     sets returned by find_avail_set, starting with the one whose source is
     a constant.


*** gcc/testsuite/ChangeLog ***

2015-01-21 Thomas Preud'homme thomas.preudho...@arm.com

     * gcc.target/arm/pr64616.c: New file.
Thomas,

I know there were several followups between Steven and yourself. With stage1 now open, can you post a final version and do a final bootstrap/test with it?

Thanks,
jeff

Reply via email to