From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 369 invoked by alias); 17 Oct 2017 09:26:20 -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 359 invoked by uid 89); 17 Oct 2017 09:26:19 -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=beast, fastest 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 09:26:18 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B0FAFAAC1; Tue, 17 Oct 2017 09:26:14 +0000 (UTC) Date: Tue, 17 Oct 2017 09:27:00 -0000 From: Richard Biener To: Nathan Sidwell cc: GCC Patches , Jeff Law Subject: Re: [PATCH PR/82546] tree node size In-Reply-To: <4fb6d651-76af-4891-a37f-9436257aa090@acm.org> 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/msg01031.txt.bz2 On Mon, 16 Oct 2017, Nathan Sidwell wrote: > On 10/16/2017 02:49 AM, Richard Biener wrote: > > On October 13, 2017 8:29:40 PM GMT+02:00, Nathan Sidwell > > wrote: > > > > I intend to continue cleaning this up of course. It's not clear to me > > > whether we should cache these node sizes in an array, and the way it > > > goes about checking nodes with nested switches is understandable, but > > > possible not the fastest solution. However let's at least get the > > > sizing > > > right first. > > > > We were conservative exactly to avoid the langhook here. I think there's > > similar 'bug' on the decl side. > > The other code types (decls, exprs, etc) call the langhook. tcc_type seems > the exception (now?). 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 /* Make a dummy type corresponding to GNAT_TYPE. */ tree make_dummy_type (Entity_Id gnat_type) { ... /* Create a debug type so that debug info consumers only see an unspecified type. */ if (Needs_Debug_Info (gnat_type)) { debug_type = make_node (LANG_TYPE); SET_TYPE_DEBUG_TYPE (gnu_type, debug_type); TYPE_NAME (debug_type) = TYPE_NAME (gnu_type); TYPE_ARTIFICIAL (debug_type) = TYPE_ARTIFICIAL (gnu_type); } Thus the patch is ok. Thanks, Richard.