From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3723 invoked by alias); 4 Nov 2011 15:26:47 -0000 Received: (qmail 3711 invoked by uid 22791); 4 Nov 2011 15:26:45 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_FN,TW_TM X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 15:26:30 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 715A98F54B; Fri, 4 Nov 2011 16:26:29 +0100 (CET) Date: Fri, 04 Nov 2011 15:40:00 -0000 From: Michael Matz To: Aldy Hernandez Cc: gcc-patches Subject: Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff In-Reply-To: <4EB2EACC.8050307@redhat.com> Message-ID: References: <4EB2EACC.8050307@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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-11/txt/msg00585.txt.bz2 Hi, On Thu, 3 Nov 2011, Aldy Hernandez wrote: > +/* GIMPLE_EH_ELSE must be the sole contents of > + a GIMPLE_TRY_FINALLY node. For all normal exits from the try block, > + we N_BODY is run; for all exception exits from the try block, s/we // > +++ gcc/calls.c (.../branches/transactional-memory) (revision 180773) > @@ -496,7 +496,60 @@ emit_call_1 (rtx funexp, tree fntree ATT > static int > special_function_p (const_tree fndecl, int flags) > { > + case BUILT_IN_TM_IRREVOCABLE: > + case BUILT_IN_TM_GETTMCLONE_IRR: > + case BUILT_IN_TM_MEMCPY: > + case BUILT_IN_TM_MEMMOVE: > + case BUILT_IN_TM_MEMSET: Whitespace. > @@ -1751,6 +1787,8 @@ walk_gimple_stmt (gimple_stmt_iterator * > gcc_assert (tree_ret == NULL); > > /* Re-read stmt in case the callback changed it. */ > + if (wi && wi->removed_stmt) > + return NULL; > stmt = gsi_stmt (*gsi); Comment belongs to the stmt assignment, not to the new if/return. > @@ -3085,6 +3153,8 @@ get_call_expr_in (tree t) > t = TREE_OPERAND (t, 1); > if (TREE_CODE (t) == WITH_SIZE_EXPR) > t = TREE_OPERAND (t, 0); > + if (TREE_CODE (t) == VIEW_CONVERT_EXPR) > + t = TREE_OPERAND (t, 0); > if (TREE_CODE (t) == CALL_EXPR) > return t; The function get_call_expr_in is unused in our compiler (and you don't introduce a new use), so instead of amending it, just remove it. > Index: gcc/gimple.h > =================================================================== > --- gcc/gimple.h (.../trunk) (revision 180744) > +++ gcc/gimple.h (.../branches/transactional-memory) (revision > 180773) > @@ -105,6 +105,7 @@ enum gf_mask { > GF_CALL_NOTHROW = 1 << 5, > GF_CALL_ALLOCA_FOR_VAR = 1 << 6, > GF_CALL_INTERNAL = 1 << 7, > + GF_CALL_NOINLINE = 1 << 8, > GF_OMP_PARALLEL_COMBINED = 1 << 0, ... > +/* Return true if S is a noinline call. */ > + > +static inline bool > +gimple_call_noinline_p (gimple s) > +{ > + GIMPLE_CHECK (s, GIMPLE_CALL); > + return (s->gsbase.subcode & GF_CALL_NOINLINE) != 0; > +} > + > +static inline void > +gimple_call_set_noinline_p (gimple s) > +{ > + GIMPLE_CHECK (s, GIMPLE_CALL); > + s->gsbase.subcode |= GF_CALL_NOINLINE; > +} This flag is only used by the new accessors gimple_call_noinline_p and gimple_call_set_noinline_p. The latter is used in trans-mem.c:ipa_tm_insert_gettmclone_call, but marked as hack. The flag isn't tested anywhere (i.e. no calls to gimple_call_noinline_p). Hence this whole thing is unused, presumably the hack was transformed into a real solution :) So, don't add the flag or the accessors, and remove the call from trans-mem.c. Ciao, Michael.