From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92289 invoked by alias); 6 Mar 2018 20:48:31 -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 87903 invoked by uid 89); 6 Mar 2018 20:48:18 -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,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Mar 2018 20:48:16 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A732C81DE9 for ; Tue, 6 Mar 2018 20:48:15 +0000 (UTC) Received: from redhat.com (unknown [10.40.205.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A80045C257; Tue, 6 Mar 2018 20:48:14 +0000 (UTC) Date: Tue, 06 Mar 2018 20:48:00 -0000 From: Marek Polacek To: Jason Merrill Cc: GCC Patches , Jakub Jelinek Subject: Re: C++ PATCH for c++/84684, wrong caching when evaluating a constexpr function Message-ID: <20180306204808.GF7043@redhat.com> References: <20180306181342.GE7043@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SW-Source: 2018-03/txt/msg00282.txt.bz2 On Tue, Mar 06, 2018 at 03:39:36PM -0500, Jason Merrill wrote: > On Tue, Mar 6, 2018 at 1:13 PM, Marek Polacek wrote: > > But I'm also wondering about massage_init_elt. It has > > tree t = fold_non_dependent_expr (init); > > t = maybe_constant_init (t); > > but given that fold_non_dependent_expr now calls maybe_constant_value, which > > then causes that we try to cache the calls above, this seems excessive, > > wouldn't we be better off with just calling fold_non_dependent_init as > > discussed recently? > > Probably. Do you want me to try it for GCC 8 or should we table it for GCC 9? I would think the latter since it's not a regression, just an optimization. > OK. Thanks. Marek