From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17612 invoked by alias); 13 Feb 2010 18:04:09 -0000 Received: (qmail 17477 invoked by uid 22791); 13 Feb 2010 18:04:07 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00 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; Sat, 13 Feb 2010 18:04:01 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 381CB890B6 for ; Sat, 13 Feb 2010 19:03:59 +0100 (CET) Resent-From: Martin Jambor Resent-Date: Sat, 13 Feb 2010 19:04:53 +0100 Resent-Message-ID: <20100213180453.GE6441@alvy.suse.cz> Resent-To: GCC Patches Message-Id: <20100213180157.398606971@alvy.suse.cz> User-Agent: quilt/0.48-1 Date: Sat, 13 Feb 2010 18:04:00 -0000 From: Martin Jambor To: GCC Patches Cc: Jan Hubicka Subject: [PATCH 4/6] Remove unused ipa_note_param_call.called flag (approved) References: <20100213180136.555197900@alvy.suse.cz> Content-Disposition: inline; filename=remove_unused_call_flag.diff 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/msg00516.txt.bz2 This patch is a minor cleanup. I 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. Thanks, Martin 2009-12-28 Martin Jambor * ipa-prop.h (struct ipa_param_descriptor): Removed the called field. (ipa_is_param_called): Removed. * ipa-prop.c (ipa_note_param_call): Do not set the called flag. Removed parameter info. (ipa_print_node_params): Do not print the called flag. Index: icln/gcc/ipa-prop.c =================================================================== --- icln.orig/gcc/ipa-prop.c +++ icln/gcc/ipa-prop.c @@ -736,20 +736,16 @@ ipa_is_ssa_with_stmt_def (tree t) } /* Create a new indirect call graph edge describing a call to a parameter - number FORMAL_ID and and set the called flag of the parameter. NODE is the - caller and is described by INFO. STMT is the corresponding call + number FORMAL_ID. NODE is the caller, STMT is the corresponding call statement. */ static void -ipa_note_param_call (struct cgraph_node *node, struct ipa_node_params *info, - int formal_id, gimple stmt) +ipa_note_param_call (struct cgraph_node *node, int formal_id, gimple stmt) { struct cgraph_edge *cs; basic_block bb = gimple_bb (stmt); int freq; - info->params[formal_id].called = 1; - freq = compute_call_stmt_bb_frequency (current_function_decl, bb); cs = cgraph_create_indirect_edge (node, stmt, bb->count, freq, bb->loop_depth); @@ -826,7 +822,7 @@ ipa_analyze_call_uses (struct cgraph_nod /* assuming TREE_CODE (var) == PARM_DECL */ index = ipa_get_param_decl_index (info, var); if (index >= 0) - ipa_note_param_call (node, info, index, call); + ipa_note_param_call (node, index, call); return; } @@ -923,7 +919,7 @@ ipa_analyze_call_uses (struct cgraph_nod index = ipa_get_param_decl_index (info, rec); if (index >= 0 && !ipa_is_param_modified (info, index)) - ipa_note_param_call (node, info, index, call); + ipa_note_param_call (node, index, call); return; } @@ -1405,8 +1401,6 @@ ipa_print_node_params (FILE * f, struct : "(unnamed)")); if (ipa_is_param_modified (info, i)) fprintf (f, " modified"); - if (ipa_is_param_called (info, i)) - fprintf (f, " called"); fprintf (f, "\n"); } } Index: icln/gcc/ipa-prop.h =================================================================== --- icln.orig/gcc/ipa-prop.h +++ icln/gcc/ipa-prop.h @@ -143,8 +143,6 @@ struct ipa_param_descriptor tree decl; /* Whether the value parameter has been modified within the function. */ unsigned modified : 1; - /* Whether the parameter has been used as a call destination. */ - unsigned called : 1; }; /* ipa_node_params stores information related to formal parameters of functions @@ -220,17 +218,6 @@ ipa_is_param_modified (struct ipa_node_p return info->params[i].modified; } -/* Return the called flag corresponding to the Ith formal parameter of the - function associated with INFO. Note that there is no setter method as the - goal is to set all flags when building the array in - ipa_detect_called_params. */ - -static inline bool -ipa_is_param_called (struct ipa_node_params *info, int i) -{ - return info->params[i].called; -} - /* Flag this node as having callers with variable number of arguments. */ static inline void