This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: ARM: allow factorization of constants into addressing insns when optimizing for space
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Nicolas Pitre <nico at cam dot org>
- Cc: Richard dot Earnshaw at arm dot com, Arpad Beszedes <beszedes at inf dot u-szeged dot hu>, rearnsha at arm dot com, alga at rgai dot hu, gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 Oct 2003 15:38:25 +0000
- Subject: Re: ARM: allow factorization of constants into addressing insns when optimizing for space
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> > This is hardly significant enough to get upset about, but I think I'm
> > going to revert the code to using a limit of 1 for two reasons:
> >
> > 1) We now have two testcases that show an increase overall, versus one
> > that shows a decrease.
> > 2) When using a limit of 2 code degradation for pathological cases seems
> > to be more severe than the degradation when the limit is 1.
>
> Agreed.
>
> What about a -mconstant_limit switch? This would allow for overriding the
> default when it is known to be beneficial.
>
My inclination would be no. It adds yet another flag that we have to
manage and document, and it's not clear what would have to be done with it
if we changed the heuristics in the compiler (for example, if the constant
limit were to change depending on the phase that the compiler was in).
That being said, if you want to submit a patch, and it is correctly
documented and implemented, I'm not going to turn it down outright.
R.