From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25829 invoked by alias); 22 Jun 2012 15:52:11 -0000 Received: (qmail 25821 invoked by uid 22791); 22 Jun 2012 15:52:10 -0000 X-SWARE-Spam-Status: No, hits=-5.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Jun 2012 15:51:55 +0000 Received: by lbol5 with SMTP id l5so3960293lbo.20 for ; Fri, 22 Jun 2012 08:51:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=A1R+fzBtseIbeTXcF06I38q/irGE6A2usi3fxjN1WxU=; b=KBn5586JkKeb1h6UHzccYTKygls3iSp/mXtPqhjNbB2YII1eKn2Zg34RMI4m3emYWy zm7RvtUIZseHgeoo069inZY4uo8tdxNq8AfkdVWUFlR/zrMGrjiO7K3cxeTya/5D99Nh S0XliupsqoM6oSMKMETEhnatvMH0GkzZVGOqIZyeKvOi9cZGvQH8ReV7rrNceUUZ8FYW TZjEDG9dWQmHx1aWvuc4zDicarKbvCwuNjjQExdZR6WrkAZLM5xjOmcFufRG+IDodAHG vS8k/XlOKJ1CtDpgMFPJJegHRWLYHdyANU6azFEUmqCuejQ8401X3yfBPc9gl4SQJYaG LJdw== Received: by 10.112.36.132 with SMTP id q4mr1697277lbj.63.1340380314295; Fri, 22 Jun 2012 08:51:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.36.132 with SMTP id q4mr1697267lbj.63.1340380314108; Fri, 22 Jun 2012 08:51:54 -0700 (PDT) Received: by 10.152.115.34 with HTTP; Fri, 22 Jun 2012 08:51:54 -0700 (PDT) In-Reply-To: References: <4FE26AFC.3000703@redhat.com> <4FE43AFD.6050601@redhat.com> Date: Fri, 22 Jun 2012 16:09:00 -0000 Message-ID: Subject: Re: New option to turn off stack reuse for temporaries From: Xinliang David Li To: Richard Guenther Cc: Jason Merrill , GCC Patches , Michael Matz Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQmDgumaIzMplMO8poG2FPUH9fTHvTZhO/qSz+D5VRR7pixoacMW0GgYnA8i2V+JTyk2vw3/JM7oi1ifVDx1mCs68EA2kjKN1i35kRUNolydeOin6Ajsbj9AUFY6R4ShC8PBGTrinxhHXsR07l9GN1T5iIv0AAWQLtEsdarpazbd04KS8saHye7cBf/SSpml5NPkRZ+N 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: 2012-06/txt/msg01478.txt.bz2 On Fri, Jun 22, 2012 at 2:39 AM, Richard Guenther wrote: > On Fri, Jun 22, 2012 at 11:29 AM, Jason Merrill wrote: >> On 06/22/2012 01:30 AM, Richard Guenther wrote: >>>> >>>> What other issues? It enables more potential code motion, but on the >>>> other hand, causes more conservative stack reuse. As far I can tell, >>>> the handling of temporaries is added independently after the clobber >>>> for scoped variables are introduced. This option can be used to >>>> restore the older behavior (in handling temps). >>> >>> >>> Well, it does not really restore the old behavior (if you mean before >>> adding >>> CLOBBERS, not before the single patch that might have used those for >>> gimplifying WITH_CLEANUP_EXPR). =A0You say it disables stack-slot shari= ng >>> for those decls but it also does other things via side-effects of no >>> longer >>> emitting the CLOBBER. =A0I say it's better to disable the stack-slot >>> sharing. >> >> >> The patch exactly restores the behavior of temporaries from before my ch= ange >> to add CLOBBERs for temporaries. =A0The primary effect of that change wa= s to >> provide stack-slot sharing, but if there are other effects they are prob= ably >> desirable as well, since the broken code depended on the old behavior. > > So you see it as workaround option, like -fno-strict-aliasing, rather than > debugging aid? It can be used for both purposes -- if the violations are as pervasive as strict-aliasing cases (which looks like so). thanks, David > > Richard. > >> Jason