From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9443 invoked by alias); 24 Nov 2007 18:46:24 -0000 Received: (qmail 9433 invoked by uid 22791); 24 Nov 2007 18:46:24 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 24 Nov 2007 18:46:17 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 4E6CC2BD50 for ; Sat, 24 Nov 2007 19:46:15 +0100 (CET) Date: Sat, 24 Nov 2007 23:31:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Shrink tree_block Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg01300.txt.bz2 This shrinks tree_block by noting that with mapped location the block locus now pairs with the flags. Also blocks do not need a type and access to the chain member of tree_common is conveniently wrapped with BLOCK_CHAIN. So, bootstrapped and tested on x86_64-unknown-linux-gnu, I'll apply this as a memory-savings regression fix later. Richard. 2007-11-24 Richard Guenther * tree.h (BLOCK_CHAIN): Use tree_block.chain. (struct tree_block): Inherit from tree_base, add chain member. Move locus member next to flags. Index: tree.h =================================================================== *** tree.h (revision 130396) --- tree.h (working copy) *************** struct varray_head_tag; *** 2007,2013 **** #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext) /* Note: when changing this, make sure to find the places that use chainon or nreverse. */ ! #define BLOCK_CHAIN(NODE) TREE_CHAIN (BLOCK_CHECK (NODE)) #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin) #define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag) --- 2008,2014 ---- #define BLOCK_SUPERCONTEXT(NODE) (BLOCK_CHECK (NODE)->block.supercontext) /* Note: when changing this, make sure to find the places that use chainon or nreverse. */ ! #define BLOCK_CHAIN(NODE) (BLOCK_CHECK (NODE)->block.chain) #define BLOCK_ABSTRACT_ORIGIN(NODE) (BLOCK_CHECK (NODE)->block.abstract_origin) #define BLOCK_ABSTRACT(NODE) (BLOCK_CHECK (NODE)->block.abstract_flag) *************** struct varray_head_tag; *** 2054,2072 **** struct tree_block GTY(()) { ! struct tree_common common; unsigned handler_block_flag : 1; unsigned abstract_flag : 1; unsigned block_num : 30; tree vars; tree subblocks; tree supercontext; tree abstract_origin; tree fragment_origin; tree fragment_chain; - location_t locus; }; /* Define fields and accessors for nodes representing data types. */ --- 2055,2075 ---- struct tree_block GTY(()) { ! struct tree_base base; ! tree chain; unsigned handler_block_flag : 1; unsigned abstract_flag : 1; unsigned block_num : 30; + location_t locus; + tree vars; tree subblocks; tree supercontext; tree abstract_origin; tree fragment_origin; tree fragment_chain; }; /* Define fields and accessors for nodes representing data types. */