From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28760 invoked by alias); 5 May 2011 09:00:23 -0000 Received: (qmail 28734 invoked by uid 22791); 5 May 2011 09:00:20 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 May 2011 09:00:05 +0000 Received: by wwf26 with SMTP id 26so2002991wwf.8 for ; Thu, 05 May 2011 02:00:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.98.9 with SMTP id o9mr2248764wbn.25.1304586004338; Thu, 05 May 2011 02:00:04 -0700 (PDT) Received: by 10.227.20.74 with HTTP; Thu, 5 May 2011 02:00:04 -0700 (PDT) In-Reply-To: <201105041914.14958.ebotcazou@adacore.com> References: <201105041710.16124.ebotcazou@adacore.com> <201105041914.14958.ebotcazou@adacore.com> Date: Thu, 05 May 2011 09:07:00 -0000 Message-ID: Subject: Re: [google]: initialize language field for clone function struct From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Xinliang David Li , Jan Hubicka 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-05/txt/msg00379.txt.bz2 On Wed, May 4, 2011 at 7:14 PM, Eric Botcazou wrote: >> Actually it turns out that it doesn't matter. =A0If 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. =A0If you cannot > easily do so (e.g. at global level), you just don't do the optimizations. > > But, yes, there is something true. =A0If you have variable sizes at the g= lobal > level, they need to be evaluated once for all (unless self-referential, b= ut > this is another subject) so you need to do it somewhere. =A0But you canno= t do > it with SAVE_EXPRs since they would end up being shared across functions. Sure, but that's a limitation of out SAVE_EXPR handling (given that it would be ok to expand the SAVE_EXPR multiple times - once per "instantiation context"). Richard. > -- > Eric Botcazou >