www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/09/18/04:42:45

Date: Tue, 18 Sep 2001 11:24:42 +0300 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp-workers AT delorie DOT com
Subject: Re: GCC 2.9x and 3.x produces larger code
In-Reply-To: <9003-Tue18Sep2001100055+0300-eliz@is.elta.co.il>
Message-ID: <Pine.A41.4.05.10109181108500.28200-100000@ieva06>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Tue, 18 Sep 2001, Eli Zaretskii wrote:

> Charles noticed that latest versions of GCC produce code that is about
> 12% larger than GCC 2.7.2.1 used to generate.  For example, building
> Make 3.79.1 with GCC 3.0.1 produces a 232KB stripped executable,
> whereas the binary produced by GCC 2.7.2.1 is only 203KB (with the
> same library).
> 
> Is this a known problem?  Can someone explain the additional bloat, or
> at least list the possible reasons for it (i.e. changes in GCC code
> generation and/or optimizations)?
> 

I think one of the reasons is code and data alignment. For example 
gcc-3.0.1 Linux to DJGPP cross-compiler generates:
	'.p2align 4' before procedure code
	'.p2align 4,,7' in some other places inside procedure (like
		before then begin of loop)

These alignment instructions are generated also by gcc-2.95.3, so I think
it would be more correct to compare with that version when compiler 
options for optimizing size are being used.

Andris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019