This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH for [ARM] subsequent use of plus and minus operators could be improved


> This patch solves the "[ARM] subsequent use of plus and
> minus operators could be improved" PR.
> 
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10242
> 
> This patch uses peephole pattern to simplify subsequent
> plus-minus operators.
> 

This is a potential problem for many platforms, not just ARM, so we should 
be looking for a generic solution.  These multiple add/subtract sequences 
are generated by register elimination during reload.  I therefore believe 
that reload_cse should be responsible for cleaning them up.

> It also includes peepholes for special cases of set register
> with "x - 0" or "x + 0".

These just should not be occuring; proper expanders will be using 
plus_constant to generate the addend, which would automatically simplify 
any addition of zero into a move.

R.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]