From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13589 invoked by alias); 4 May 2011 17:14:47 -0000 Received: (qmail 13577 invoked by uid 22791); 4 May 2011 17:14:46 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 May 2011 17:14:32 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 35C4DCB0243; Wed, 4 May 2011 19:14:31 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cF5o7SdbFEQl; Wed, 4 May 2011 19:14:28 +0200 (CEST) Received: from new-host.home (ADijon-552-1-27-110.w92-138.abo.wanadoo.fr [92.138.162.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 1A580CB0214; Wed, 4 May 2011 19:14:28 +0200 (CEST) From: Eric Botcazou To: Richard Guenther Subject: Re: [google]: initialize language field for clone function struct Date: Wed, 04 May 2011 17:22:00 -0000 User-Agent: KMail/1.9.9 Cc: gcc-patches@gcc.gnu.org, Xinliang David Li , Jan Hubicka References: <201105041710.16124.ebotcazou@adacore.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201105041914.14958.ebotcazou@adacore.com> 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-05/txt/msg00327.txt.bz2 > Actually it turns out that it doesn't matter. If we arrive here with > something that needs a SAVE_EXPR we have to be able to generate code > for it somewhere, where there would be obviously the possibility to > also generate code for a SAVE_EXPR. The transformations done in fold are optimizations that duplicate things, hence the need to protect them from multiple evaluations. If you cannot easily do so (e.g. at global level), you just don't do the optimizations. But, yes, there is something true. If you have variable sizes at the global level, they need to be evaluated once for all (unless self-referential, but this is another subject) so you need to do it somewhere. But you cannot do it with SAVE_EXPRs since they would end up being shared across functions. -- Eric Botcazou