From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13411 invoked by alias); 11 Mar 2011 13:25:47 -0000 Received: (qmail 13373 invoked by uid 22791); 11 Mar 2011 13:25:45 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_BJ,TW_JC X-Spam-Check-By: sourceware.org Received: from mail-iw0-f175.google.com (HELO mail-iw0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Mar 2011 13:25:40 +0000 Received: by iwn10 with SMTP id 10so2952361iwn.20 for ; Fri, 11 Mar 2011 05:25:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.43.60.71 with SMTP id wr7mr2291382icb.148.1299849938955; Fri, 11 Mar 2011 05:25:38 -0800 (PST) Received: by 10.231.10.130 with HTTP; Fri, 11 Mar 2011 05:25:38 -0800 (PST) In-Reply-To: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> References: <1299817406-16745-1-git-send-email-froydnj@codesourcery.com> Date: Fri, 11 Mar 2011 13:25:00 -0000 Message-ID: Subject: Re: [4.7 PATCH 00/18] slim down a number of tree nodes From: Richard Guenther To: Nathan Froyd Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, java-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2011-03/txt/msg00603.txt.bz2 On Fri, Mar 11, 2011 at 5:23 AM, Nathan Froyd wr= ote: > This patch series does something similar to what: > > http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02491.html > > did, only it does it in a cleaner way and it addresses the problem more > generally. =A0It introduces a separate substructure (base class) for tree > nodes that include TREE_TYPE so that a tree node can use TREE_TYPE > without having to deal with TREE_CHAIN. =A0It then goes about making > changes where necessary to both use this new substructure and eliminate > unnecessary TREE_CHAIN usage. > > Eliminating the block field from tree_exp would be another nice-to-have > for 4.7, but that's not on my radar of things to address at the moment. > (Matz, you want to do that? :) =A0Eliminating TREE_TYPE from tree_exp as > suggested on the wiki would be another interesting project, but not one > I plan on tackling. I think removing TREE_TYPE from tree_exp isn't worth it, we do not have many expression trees left with tuples. Unifying BLOCK with locations would indeed be nice (but again we don't have many exp trees left). > The patch series touches every front-end in various places. =A0I have CC'd > the appropriate mailing lists with this introductory email, but I will > only CC those mailing lists on followup patches that touch the > appropriate FE. > > I have not rigorously measured memory savings with this patch. =A0Based on > a (very small) sample, this patch saves ~5% of tree memory according to > dump_tree_statistics...though the amount of tree memory as reported by > dump_tree_statistics is somewhat suspect, since it doesn't include > statistics from copy_node_stat. I thought I had fixed that ... but appearantly I didn't commit that part. > The patch series has been bootstrapped on x86_64-unknown-linux-gnu, both > in its entirety and with sub-patches along the way. =A0Indeed, the patches > were not developed in this order; the checking bits were introduced > first, then any bootstrap or testsuite failures were fixed up, then the > patches were committed in the proper order. Did you make sure to enable all languages? And grep for occurances in backends? Thanks, Richard. > Nathan Froyd (18): > =A0add typed_tree structure > =A0enforce TREE_CHAIN and TREE_TYPE accesses > =A0remove TREE_CHAIN from *_CST nodes > =A0remove TREE_CHAIN from SSA_NAME nodes > =A0remove TREE_CHAIN from CONSTRUCTOR nodes > =A0define CASE_CHAIN accessor for CASE_LABEL_EXPR > =A0generalize build_case_label to the rest of the compiler > =A0convert cp *FOR_STMTs to use private scope fields > =A0convert cp IF_STMTs to use private scope fields > =A0convert cp SWITCH_STMTs to use private scope fields > =A0mark EXPR_PACK_EXPANSION as typed only > =A0make CASE_LABEL_EXPR not abuse TREE_CHAIN > =A0move TS_EXP to be a substructure of TS_TYPED > =A0move TS_STATEMENT_LIST to be a substructure of TS_TYPED > =A0move REAL_IDENTIFIER_TYPE_VALUE to be a field of lang_identifier > =A0make TS_IDENTIFIER be a substructure of TS_BASE > =A0introduce block_chainon and use BLOCK_CHAIN more > =A0make TS_BLOCK a substructure of TS_BASE > > =A0gcc/ada/gcc-interface/ada-tree.h | =A0 =A02 +- > =A0gcc/ada/gcc-interface/misc.c =A0 =A0 | =A0 16 ++++++ > =A0gcc/ada/gcc-interface/trans.c =A0 =A0| =A0 =A05 +- > =A0gcc/ada/gcc-interface/utils.c =A0 =A0| =A0 =A04 +- > =A0gcc/c-decl.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A08 ++- > =A0gcc/c-family/c-common.c =A0 =A0 =A0 =A0 =A0| =A0 14 +++++- > =A0gcc/c-family/c-common.h =A0 =A0 =A0 =A0 =A0| =A0 20 +++++--- > =A0gcc/c-family/c-semantics.c =A0 =A0 =A0 | =A0 28 ++++------- > =A0gcc/c-lang.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 + > =A0gcc/c-parser.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/c-typeck.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/cp/cp-lang.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 22 +-------- > =A0gcc/cp/cp-objcp-common.c =A0 =A0 =A0 =A0 | =A0 74 ++++++++++++++++++++= +++++++ > =A0gcc/cp/cp-objcp-common.h =A0 =A0 =A0 =A0 | =A0 =A01 + > =A0gcc/cp/cp-tree.def =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 19 ++++--- > =A0gcc/cp/cp-tree.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 43 ++++++++++--= ---- > =A0gcc/cp/decl.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 28 ++++++--= -- > =A0gcc/cp/decl2.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 20 ++++--- > =A0gcc/cp/error.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/cp/init.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A06 +- > =A0gcc/cp/mangle.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 28 +++++++--- > =A0gcc/cp/name-lookup.c =A0 =A0 =A0 =A0 =A0 =A0 | =A0 10 ++-- > =A0gcc/cp/pt.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 40 ++++++= +++------ > =A0gcc/cp/repo.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A02 +- > =A0gcc/cp/rtti.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A06 +- > =A0gcc/cp/search.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A04 +- > =A0gcc/cp/semantics.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 41 +++++++++------ > =A0gcc/cp/typeck.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A04 +- > =A0gcc/except.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A05 +- > =A0gcc/fortran/f95-lang.c =A0 =A0 =A0 =A0 =A0 | =A0 =A08 ++-- > =A0gcc/fortran/trans-decl.c =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/fortran/trans-io.c =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/fortran/trans-stmt.c =A0 =A0 =A0 =A0 | =A0 14 ++--- > =A0gcc/function.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 28 ++++++++++ > =A0gcc/function.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A01 + > =A0gcc/gimplify.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 14 +++--- > =A0gcc/go/go-lang.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/java/decl.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 13 ++--- > =A0gcc/java/expr.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A09 ++-- > =A0gcc/java/java-tree.h =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/lto-streamer-in.c =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A02 +- > =A0gcc/lto-streamer-out.c =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/lto-streamer.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A01 + > =A0gcc/lto/lto-tree.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/lto/lto.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A03 +- > =A0gcc/objc/objc-act.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 18 +++++++ > =A0gcc/objc/objc-act.h =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A01 + > =A0gcc/objc/objc-lang.c =A0 =A0 =A0 =A0 =A0 =A0 | =A0 32 +----------- > =A0gcc/objcp/objcp-lang.c =A0 =A0 =A0 =A0 =A0 | =A0 48 +----------------- > =A0gcc/omp-low.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A07 +-- > =A0gcc/print-tree.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 11 +--- > =A0gcc/tree-cfg.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 12 ++-- > =A0gcc/tree-eh.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 22 +++----- > =A0gcc/tree-flow.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A02 +- > =A0gcc/tree-inline.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A03 +- > =A0gcc/tree-iterator.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 17 ++---- > =A0gcc/tree-ssanames.c =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 28 +++------- > =A0gcc/tree.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 96 ++++++= ++++++----------------------- > =A0gcc/tree.def =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A02 +- > =A0gcc/tree.h =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0103 ++++++= +++++++++++++++++++++++-------- > =A0gcc/treestruct.def =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A01 + > =A0gcc/varasm.c =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A01 - > =A062 files changed, 535 insertions(+), 432 deletions(-) > >