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: Nicolas Pitre <nico at cam dot org>
- To: Richard dot Earnshaw at arm dot com
- Cc: 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 10:22:51 -0500 (EST)
- Subject: Re: ARM: allow factorization of constants into addressing insns when optimizing for space
On Wed, 29 Oct 2003, Richard Earnshaw wrote:
> In an attempt to try and resolve this issue, I tried building gcc with -Os
> for the two different configurations. Again, the results are not entierly
> conclusive.
>
> Of the 212 files compiled 57 resulted in a larger object file when the
> limit was 1, while 38 resulted in a larger object file when the limit was
> 2. However, those 57 files that increased in size increased by 2008
> bytes, while those that increased when the limit was 2 increased by 2436
> bytes. Which means that in total using a limit of 1 resulted in a net
> decrease in file size of 428 bytes (approximately 0.02%).
>
> 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.
Nicolas