From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 21 04:14:14 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 83D6016A4D0 for ; Sun, 21 Mar 2004 04:14:14 -0800 (PST) Received: from mail.acis.com.au (atlantis.acis.com.au [203.14.230.6]) by mx1.FreeBSD.org (Postfix) with SMTP id 11F1E43D39 for ; Sun, 21 Mar 2004 04:14:13 -0800 (PST) (envelope-from andymac@bullseye.apana.org.au) Received: (qmail 96849 invoked from network); 21 Mar 2004 12:14:10 -0000 Received: from dialup14-async.civ.acis.com.au (HELO bullseye.apana.org.au) (203.10.77.14) by atlantis.acis.com.au with SMTP; 21 Mar 2004 12:14:10 -0000 Received: from bullseye.apana.org.au (localhost.apana.org.au [127.0.0.1]) i2L5ruOj033284; Sun, 21 Mar 2004 16:53:56 +1100 (EST) (envelope-from andymac@bullseye.apana.org.au) Received: from localhost (andymac@localhost)i2L5ru75033281; Sun, 21 Mar 2004 16:53:56 +1100 (EST) (envelope-from andymac@bullseye.apana.org.au) Date: Sun, 21 Mar 2004 16:53:56 +1100 (EST) From: Andrew MacIntyre To: Garance A Drosihn In-Reply-To: Message-ID: <20040321164733.N33243@bullseye.apana.org.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org Subject: Re: Adventures with gcc: code vs object-code size X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 12:14:14 -0000 On Sat, 20 Mar 2004, Garance A Drosihn wrote: > I am not a compilier guru, so I suspect it would take me hours to > pin this down. I don't want to do that, so I'm wondering if anyone > understands how such a minor code-change can POSSIBLY cause such a > huge change in resulting object file... I also wonder if this same > issue pops up in other programs, too. I'm not a guru either, but I've seen a case where adding code (mostly switch clauses) caused a size reduction (on i386 anyway)... Depending on the optimisation level, it might be that the added code is affecting the heuristics gcc is using for inlined functions etc. -- Andrew I MacIntyre "These thoughts are mine alone..." E-mail: andymac@bullseye.apana.org.au (pref) | Snail: PO Box 370 andymac@pcug.org.au (alt) | Belconnen ACT 2616 Web: http://www.andymac.org/ | Australia