From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15109 invoked by alias); 10 Mar 2015 23:59:32 -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 15096 invoked by uid 89); 10 Mar 2015 23:59:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 10 Mar 2015 23:59:31 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2ANxTJ8024940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 10 Mar 2015 19:59:29 -0400 Received: from [10.10.116.31] ([10.10.116.31]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2ANxSPu003868; Tue, 10 Mar 2015 19:59:29 -0400 Message-ID: <54FF8560.2080502@redhat.com> Date: Tue, 10 Mar 2015 23:59:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Aldy Hernandez , gcc-patches Subject: Re: [patch] Optimize empty class copies within a C++ return statement References: <54F8E5D3.4050607@redhat.com> <54F94715.4000208@redhat.com> <54F9D396.3000400@redhat.com> <54FA2046.9090500@redhat.com> <54FA21FD.9040609@redhat.com> <54FA23B4.3090402@redhat.com> <54FA23D7.3030301@redhat.com> <54FDE762.6040409@redhat.com> <54FE5C13.4050904@redhat.com> <54FF7A00.7060705@redhat.com> In-Reply-To: <54FF7A00.7060705@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00615.txt.bz2 On 03/10/2015 07:10 PM, Aldy Hernandez wrote: > - /* Remove any copies of empty classes. We check that the RHS > - has a simple form so that TARGET_EXPRs and non-empty > - CONSTRUCTORs get reduced properly, and we leave the return > - slot optimization alone because it isn't a copy (FIXME so it > - shouldn't be represented as one). Let's keep this comment. > gimplify op0 to an lvalue Also, I don't see this first step in the patch; I wanted that so the op0 side-effects happen first. Jason