From patchwork Thu Aug 7 22:55:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 378023 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6CBBE1400D2 for ; Fri, 8 Aug 2014 08:55:21 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=PFEEDpjMQnk8xT1+7 sgh52KdAjz1ZBcMKvulTECrDdjc5ygnMo9fcVZp/YvabUPknBQGhOluScLcM2pkv aob3EnwwOyPNtICXmlAD53TeAQFjDP5+QtZKv8KLytmR9m7VI74WuCuzjtvj35li T7al3EAUrVUc0HZltjibQ1y/nU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=pkgoiLfk8vwLwB0zElPu0Q1 JuS0=; b=flHsouCjwVik33ez3Cg+3gkD4xvgwAcKBzDBkas4oQRvw1wUKAXutiO C0U3lipTK1K/QvzKhyA/0hDTV7IMJ7WqinVqJrMz+fcb30LAAAnSyA975nX2LEqK 4qc6pyJn/mWxUtybZpf9hmLRbepWdgWFXGMMAeSvxu4SvXAc3Wso= Received: (qmail 16122 invoked by alias); 7 Aug 2014 22:55:05 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 16104 invoked by uid 89); 7 Aug 2014 22:55:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients 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; Thu, 07 Aug 2014 22:55:04 +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 s77Mt20R011054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 7 Aug 2014 18:55:02 -0400 Received: from localhost (ovpn-116-37.ams2.redhat.com [10.36.116.37]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s77Mt17h023897; Thu, 7 Aug 2014 18:55:02 -0400 Date: Thu, 7 Aug 2014 23:55:01 +0100 From: Jonathan Wakely To: Dominique Dhumieres Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: [patch] Avoid memory allocations when making futures ready Message-ID: <20140807225501.GQ6927@redhat.com> References: <20140807220718.C3361105@mailhost.lps.ens.fr> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140807220718.C3361105@mailhost.lps.ens.fr> User-Agent: Mutt/1.5.23 (2014-03-12) On 08/08/14 00:07 +0200, Dominique Dhumieres wrote: >> This patch replaces some reference members with pointers, ... >> ... >> Tested x86_64-linux, committed to trunk. > >This breaks bootstrap (see https://gcc.gnu.org/ml/gcc-regression/2014-08/): Fixed by this patch, sorry about that. I was caught out (again) by the files in libstdc++-v3/src/*/ not being recompiled when headers change. Tested x86_64-linux with full bootstrap, committed to trunk. commit b5af1e35e9c52ea8738997431ab958dc4caf85c6 Author: Jonathan Wakely Date: Thu Aug 7 23:20:09 2014 +0100 * include/std/future (__location_invariant): Move specializations after preprocessor condition. diff --git a/libstdc++-v3/include/std/future b/libstdc++-v3/include/std/future index c3aaaec..8989474 100644 --- a/libstdc++-v3/include/std/future +++ b/libstdc++-v3/include/std/future @@ -551,6 +551,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void _M_destroy() { delete this; } }; +#ifndef _GLIBCXX_ASYNC_ABI_COMPAT + // Allow _Setter objects to be stored locally in std::function template struct __is_location_invariant @@ -563,8 +565,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION <__future_base::_Task_setter<_Res_ptr, _Fn, _Res>> : true_type { }; -#ifndef _GLIBCXX_ASYNC_ABI_COMPAT - /// Common implementation for future and shared_future. template class __basic_future : public __future_base