This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/6] Remove unused ipa_note_param_call.called flag (approved)


On Sat, Feb 13, 2010 at 7:01 PM, Martin Jambor <mjambor@suse.cz> wrote:
> 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.

If this applies independently of the rest of the series it is ok for the trunk
at this stage.

Thanks,
Richard.

> Thanks,
>
> Martin
>
>
> 2009-12-28 ?Martin Jambor ?<mjambor@suse.cz>
>
> ? ? ? ?* 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
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]