From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30007 invoked by alias); 20 Aug 2003 19:55:49 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29993 invoked from network); 20 Aug 2003 19:55:48 -0000 Received: from unknown (HELO zenia.home) (12.223.225.216) by sources.redhat.com with SMTP; 20 Aug 2003 19:55:48 -0000 Received: by zenia.home (Postfix, from userid 5433) id 36A51202C8; Wed, 20 Aug 2003 14:56:54 -0500 (EST) To: Michael Elizabeth Chastain Cc: ezannoni@redhat.com, gdb-patches@sources.redhat.com Subject: Re: [rfa] space reduction in gdbtypes.h References: <200308201746.h7KHkdkV009277@duracef.shout.net> From: Jim Blandy Date: Wed, 20 Aug 2003 19:55:00 -0000 In-Reply-To: <200308201746.h7KHkdkV009277@duracef.shout.net> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-08/txt/msg00345.txt.bz2 Michael Elizabeth Chastain writes: > More space reduction! This is the last of the low-hanging fruit. > > before: 90001408 > after: 87068672 > > This is a re-arrangement of 'struct main_type'. > > struct main_type 52 40 > > Testing: native i686-pc-linux-gnu, gcc v2 and v3, dwarf-2 and stabs+. > Full test suite, not regressions. > > Okay to commit? Yes, with some minor changes: - I think it's important that this struct start with something that indicates which sort of type it represents. It's weird to have the discriminant buried in the middle. So leave 'code' the first member of the structure, and move the {upper,lower}_bound_type fields up. - Add a short comment indicating that the {upper,lower}_bound_type fields pack better at that location. It's a shame that one needs to make things less clear (e.g., moving vptr_fieldno away from vptr_basetype) in order to save space. I wish there were some way to tell the compiler, "I don't care about the in-memory ordering of these fields, just pack them as tightly as you can."