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: [ipa-prop, patch] Merge of parameter describing arrays and naming cleanup


> 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


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