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: 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


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