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, 22 Oct 2003, Richard Earnshaw wrote:

> [counter-example snipped]
> 
> > For a real example, also consider a saving of 13000 bytes of text in a Linux
> > kernel binary.
> > 
> 
> What percentage reduction is this?

   text    data     bss     dec     hex filename
1526260   74756   75848 1676864  199640 vmlinux.1
1513184   74756   75848 1663788  19632c vmlinux.2

This is 0.86% text reduction, or 0.78% overal size reduction.

> CSiBE isn't a single application, it's a benchmark that comprises files 
> from sereral applications and totals about 1Mb of compiled ARM code.  So 
> it's not a trivial counter example.

I guess it really depends on the field of application.  Device drivers 
benefit a lot from factorisation, like in the Linux kernel.  Other type of 
code might not benefit as much.

> 0.4% is small, but not insignificant.  To judge its importance we need to 
> weigh it against the benefit in the example you were working on (the Linux 
> kernel in this case).

Granted, 0.8% reduction isn't that big either, but just for the sake of 
arguing this is twice as significant.  ;-)

Maybe the avoiding of cold cache is worth it though, i.e. not having to
stall on a cache miss for the initial memory load vs synthesizing with 2
insns.


Nicolas


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