This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ipa-prop, patch] Merge of parameter describing arrays and naming cleanup
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <jh at suse dot cz>, Razya Ladelsky <RAZYA at il dot ibm dot com>, Richard Guenther <rguenther at suse dot de>
- Date: Fri, 25 Jul 2008 19:23:08 +0200
- Subject: Re: [ipa-prop, patch] Merge of parameter describing arrays and naming cleanup
- References: <20080725170653.GA13107@virgil.suse.cz>
> Hi,
>
> this patch does two things that were requested by Honza:
>
> 1. It merges three arrays that describe formal parameters into
> one, and
> 2. gets rid of the _ith_ part of names of various access functions
>
> The trunk patch has been successfully bootstrapped and tested on
> i586-gnu-linux. I'm also attaching (so far untested) tuples patch
> which is not different in any meaningful way but should apply nicely
> to the patch set submitted in
> http://gcc.gnu.org/ml/gcc-patches/2008-07/msg01874.html
>
>
> Martin
>
>
> 2008-07-25 Martin Jambor <mjambor@suse.cz>
>
> * ipa-prop.h (struct ipa_param_flags): Removed.
> (struct ipa_param_descriptor): New structure.
> (struct ipa_node_params): ipcp_lattices, param_decls and
> param_flags moved to ipa_param_description.
> (ipa_get_ith_param): Renamed to ipa_get_param, changed to access
> descriptors. Renamed all users.
> (ipa_is_ith_param_modified): Renamed to ipa_is_param_modified,
> changed to access descriptors. Renamed all users.
> (ipa_is_ith_param_called): Renamed to ipa_is_param_called, changed
> to access descriptors. Renamed all users.
> * ipa-cp.c (ipcp_init_cloned_node): Call
> ipa_initialize_node_params instead of ipa_count_formal_params and
> ipa_create_param_decls_array.
> (ipcp_get_ith_lattice): Removed to ipcp_get_lattice, changed to access
> descriptors. Renamed all users.
> (ipcp_initialize_node_lattices): Remove allocation.
> (ipcp_init_stage): Call ipa_initialize_node_params instead of
> ipa_count_formal_params and ipa_create_param_decls_array.
> * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call
> ipa_initialize_node_params instead of ipa_count_formal_params and
> ipa_create_param_decls_array.
> * ipa-prop.c (ipa_create_param_decls_array): Renamed to
> ipa_populate_param_decls, made static, added parameter info,
> renamed mt to node, removed allocation, changed to use
> descriptors.
> (ipa_count_formal_params): Made static, added parameter info,
> renamed mt to node.
> (ipa_initialize_node_params): New function.
> (ipa_check_stmt_modifications): Changed to use descriptors.
> (ipa_detect_param_modifications): Removed allocation, changed to
> use descriptors.
> (ipa_note_param_call): Changed to use descriptors.
> (ipa_analyze_params_uses): Removed allocation and DECL_SAVED_TREE
> check.
> (ipa_free_node_params_substructures): Changed to use descriptors.
> (ipa_edge_duplication_hook): Use the unused attribute.
> (ipa_node_duplication_hook): Use the unused attribute, changed to
> use descriptors, changed to duplicate descriptors.
This is OK.
I would probably rename the "descriptors" field to "param" and drop
"param_" from "param_decl".
info->param[i].decl seems to read better than
info->descriptors[i].param_decl
similarly for modified/called flags.
Honza