From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22119 invoked by alias); 13 Feb 2010 18:14:12 -0000 Received: (qmail 22111 invoked by uid 22791); 13 Feb 2010 18:14:11 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f203.google.com (HELO mail-px0-f203.google.com) (209.85.216.203) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Feb 2010 18:14:07 +0000 Received: by pxi41 with SMTP id 41so2409327pxi.27 for ; Sat, 13 Feb 2010 10:14:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.180.2 with SMTP id c2mr2012665rvf.245.1266084845981; Sat, 13 Feb 2010 10:14:05 -0800 (PST) In-Reply-To: <20100213180157.398606971@alvy.suse.cz> References: <20100213180136.555197900@alvy.suse.cz> <20100213180157.398606971@alvy.suse.cz> Date: Sat, 13 Feb 2010 18:14:00 -0000 Message-ID: <84fc9c001002131014m107f353csfb43134fdf39fd74@mail.gmail.com> Subject: Re: [PATCH 4/6] Remove unused ipa_note_param_call.called flag (approved) From: Richard Guenther To: Martin Jambor Cc: GCC Patches , Jan Hubicka Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2010-02/txt/msg00520.txt.bz2 On Sat, Feb 13, 2010 at 7:01 PM, Martin Jambor wrote: > This patch is a minor cleanup. =A0I have realized that the called flag > in the ipa-prop parameter descriptor is not used and I could not > really think how the flag can be obviously useful in a short-term > either so I removed it. > > I have bootstrapped and tested this change along with the next one in > the series. > > The patch has already been approved by Honza but this is its place in > the series and so I re-send it along. If this applies independently of the rest of the series it is ok for the tr= unk at this stage. Thanks, Richard. > Thanks, > > Martin > > > 2009-12-28 =A0Martin Jambor =A0 > > =A0 =A0 =A0 =A0* ipa-prop.h (struct ipa_param_descriptor): Removed the ca= lled field. > =A0 =A0 =A0 =A0(ipa_is_param_called): Removed. > =A0 =A0 =A0 =A0* ipa-prop.c (ipa_note_param_call): Do not set the called = flag. > =A0 =A0 =A0 =A0Removed parameter info. > =A0 =A0 =A0 =A0(ipa_print_node_params): Do not print the called flag. > > Index: icln/gcc/ipa-prop.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- icln.orig/gcc/ipa-prop.c > +++ icln/gcc/ipa-prop.c > @@ -736,20 +736,16 @@ ipa_is_ssa_with_stmt_def (tree t) > =A0} > > =A0/* Create a new indirect call graph edge describing a call to a parame= ter > - =A0 number FORMAL_ID and and set the called flag of the parameter. =A0N= ODE is the > - =A0 caller and is described by INFO. =A0STMT is the corresponding call > + =A0 number FORMAL_ID. =A0NODE is the caller, STMT is the corresponding = call > =A0 =A0statement. =A0*/ > > =A0static void > -ipa_note_param_call (struct cgraph_node *node, struct ipa_node_params *i= nfo, > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0int formal_id, gimple stmt) > +ipa_note_param_call (struct cgraph_node *node, int formal_id, gimple stm= t) > =A0{ > =A0 struct cgraph_edge *cs; > =A0 basic_block bb =3D gimple_bb (stmt); > =A0 int freq; > > - =A0info->params[formal_id].called =3D 1; > - > =A0 freq =3D compute_call_stmt_bb_frequency (current_function_decl, bb); > =A0 cs =3D cgraph_create_indirect_edge (node, stmt, bb->count, freq, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bb= ->loop_depth); > @@ -826,7 +822,7 @@ ipa_analyze_call_uses (struct cgraph_nod > =A0 =A0 =A0 /* assuming TREE_CODE (var) =3D=3D PARM_DECL */ > =A0 =A0 =A0 index =3D ipa_get_param_decl_index (info, var); > =A0 =A0 =A0 if (index >=3D 0) > - =A0 =A0 =A0 ipa_note_param_call (node, info, index, call); > + =A0 =A0 =A0 ipa_note_param_call (node, index, call); > =A0 =A0 =A0 return; > =A0 =A0 } > > @@ -923,7 +919,7 @@ ipa_analyze_call_uses (struct cgraph_nod > > =A0 index =3D ipa_get_param_decl_index (info, rec); > =A0 if (index >=3D 0 && !ipa_is_param_modified (info, index)) > - =A0 =A0ipa_note_param_call (node, info, index, call); > + =A0 =A0ipa_note_param_call (node, index, call); > > =A0 return; > =A0} > @@ -1405,8 +1401,6 @@ ipa_print_node_params (FILE * f, struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 : "(unnamed)")); > =A0 =A0 =A0 if (ipa_is_param_modified (info, i)) > =A0 =A0 =A0 =A0fprintf (f, " modified"); > - =A0 =A0 =A0if (ipa_is_param_called (info, i)) > - =A0 =A0 =A0 fprintf (f, " called"); > =A0 =A0 =A0 fprintf (f, "\n"); > =A0 =A0 } > =A0} > Index: icln/gcc/ipa-prop.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- icln.orig/gcc/ipa-prop.h > +++ icln/gcc/ipa-prop.h > @@ -143,8 +143,6 @@ struct ipa_param_descriptor > =A0 tree decl; > =A0 /* Whether the value parameter has been modified within the function.= =A0*/ > =A0 unsigned modified : 1; > - =A0/* Whether the parameter has been used as a call destination. */ > - =A0unsigned called : 1; > =A0}; > > =A0/* ipa_node_params stores information related to formal parameters of = functions > @@ -220,17 +218,6 @@ ipa_is_param_modified (struct ipa_node_p > =A0 return info->params[i].modified; > =A0} > > -/* Return the called flag corresponding to the Ith formal parameter of t= he > - =A0 function associated with INFO. =A0Note that there is no setter meth= od as the > - =A0 goal is to set all flags when building the array in > - =A0 ipa_detect_called_params. =A0*/ > - > -static inline bool > -ipa_is_param_called (struct ipa_node_params *info, int i) > -{ > - =A0return info->params[i].called; > -} > - > =A0/* Flag this node as having callers with variable number of arguments.= =A0*/ > > =A0static inline void > >