From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4286 invoked by alias); 17 Oct 2017 14:18:02 -0000 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 Received: (qmail 4216 invoked by uid 89); 17 Oct 2017 14:18:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=person X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Oct 2017 14:18:00 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BD239ADD5; Tue, 17 Oct 2017 14:17:57 +0000 (UTC) Date: Tue, 17 Oct 2017 14:29:00 -0000 From: Richard Biener To: Nathan Sidwell cc: GCC Patches , Jeff Law , Olivier Hainque Subject: Re: [PATCH PR/82546] tree node size In-Reply-To: Message-ID: References: <3e7ecb64-cd96-47a3-cb75-53e41317d90c@acm.org> <73AFE619-57E8-4944-ADB7-0D1AC9118E34@suse.de> <4fb6d651-76af-4891-a37f-9436257aa090@acm.org> User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2017-10/txt/msg01062.txt.bz2 On Tue, 17 Oct 2017, Nathan Sidwell wrote: > On 10/17/2017 05:26 AM, Richard Biener wrote: > > > Sorry for not looking at the patch before replying. The patch looks ok > > but shouldn't LANG_TYPE be also handled by the FE? LANG_TYPE itself > > is an odd beast if I may say that - it's only used by the C++ and Ada FEs > > and the Ada FE does only > > I agree. I think LANG_TYPE may be from when there were no FE-specific nodes. > It should probably be killed and resurrected as appropriate FE nodes. > > Olivier, as an ADA person, is that something that could be done? > > > Thus the patch is ok. > > Thanks, > > As a heads up, we currently have: > > struct type_common; > struct type_with_lang_specific : type_common; > struct type_non_common : type_with_lang_specific; > > And many (most?, all?) FE type nodes derive from type_non_common (even if, as > I discovered, they don't know it). It seems the hierarchy would be better as: > > struct type_common; > struct type_non_common : type_common; // FE type derive here > struct type_with_lang_specific : type_non_common; > > After all, why would a FE-specific type need a lang-specific pointer? I don't > think there are types that just have the land-pointer and don't have > non_common. > > That's the direction I'm heading in with this clean up. Not sure. For decls the lang_specific pointer is even in decl_common! It's probably that there are basically no types w/o a FE using the lang-specific pointer but there are some types using type_common fields only (but need lang-specifics). So maybe do like with decls and remove type_with_lang_specific, instead folding it into type_common? Richard. -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)