From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26147 invoked by alias); 3 May 2012 16:32:06 -0000 Received: (qmail 26040 invoked by uid 22791); 3 May 2012 16:32:00 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 May 2012 16:31:47 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q43GVlaQ010455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 May 2012 12:31:47 -0400 Received: from [10.11.10.165] (vpn-10-165.rdu.redhat.com [10.11.10.165]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q43GVkjK008161; Thu, 3 May 2012 12:31:46 -0400 Message-ID: <4FA2B2F1.1000802@redhat.com> Date: Thu, 03 May 2012 16:32:00 -0000 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc13 Thunderbird/3.1.10 MIME-Version: 1.0 To: Richard Guenther CC: gcc-patches , Richard Henderson , Aldy Hernandez Subject: Re: [C11-atomic] [patch] gimple atomic statements References: <4F7B5218.6070609@redhat.com> <4F7C4C75.4000304@redhat.com> <4F7C6DC5.2010200@redhat.com> <4F998B96.7080204@redhat.com> <4F9A91AC.7070708@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-05/txt/msg00264.txt.bz2 On 05/03/2012 05:59 AM, Richard Guenther wrote: > >> the type can be removed from the structure and now there would be no >> wastage. Is that reasonable? > types in ops is a bad idea (tried that once - heh), it wrecks too much generic > code. > heh, no doubt. As I Iooked at handling the generic atomics, looks like Im going to restructure it anyway a bit, and it will actually match what you were looking for in the first place. the generic functions deal with slabs of memory, so instead of a LHS, they pass in a pointer for the result. as well as any other values like the RHS expression value. so now I expect to see something more along the lines of gimple_atomic_base { kind, order } gimple_atomic_target_base : gimple_atomic_base { type, target } gimple_atomic : gimple_atomic_target_base { ops[] } gimple_atomic_generic : gimple_atomic_target_base { return_val; ops[] } so FENCEs will be gimple_atomic_base, all the rest of the normal ones will be gimple_atomic and the generi oness will be gimple_atomic_generic or something like that. It aint working yet so it isnt in stone and those are just preliminary names, but it will have a proper hierarchy of some sort. :-) Andrew