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, pretty-ipa merge 1/4] Function parameter manipulation infrastructer through param notes


> 2009-07-01  Martin Jambor  <mjambor@suse.cz>
> 
> 	* ipa-prop.c (count_formal_params_1): New function.
> 	(ipa_get_vector_of_formal_parms): New function.
> 	(get_vector_of_formal_parm_types): New function.
> 	(ipa_modify_formal_parameters): New function.
> 	(ipa_modify_call_arguments): New function.
> 	(index_in_adjustments_multiple_times_p): New function.
> 	(ipa_combine_adjustments): New function.
> 	(ipa_dump_param_adjustments): New function.
> 
> 	* ipa-prop.h (struct ipa_parm_adjustment): New type.
> 	(ipa_get_vector_of_formal_parms): Declare.
> 	(ipa_modify_formal_parameters): Declare.
> 	(ipa_modify_call_arguments): Declare.
> 	(ipa_combine_adjustments): Declare.
> 	(ipa_dump_param_adjustments): Declare.
> 	(build_ref_for_offset): Declare.
> 
> 	* Makefile.in (tree-sra.o): Add ipa-prop.h to dependencies.
> 
> 	* tree-sra.c: Include ipa-prop.c.
> 	(build_ref_for_offset): Make public. 
> 
> +/* Structure to describe transformations of formal parameters and actual
> +   arguments.  Each instance describes one new parameter and they are meant to
> +   be stored in a vector.  Additionally, most users will probably want to store
> +   adjustments about parameters that are being removed altogether so that SSA
> +   names belonging to them can be replaced by SSA names of an artificial
> +   variable.  */
> +struct ipa_parm_adjustment
> +{
> +  /* The original PARM_DECL itself, helpful for processing of the body of the
> +     function itself.  Intended for traversing function bodies.
> +     ipa_modify_formal_parameters, ipa_modify_call_arguments and
> +     ipa_combine_adjustments ignore this and use base_index.
> +     ipa_modify_formal_parameters actually sets this.  */
> +  tree base;

Hmm, BASE is bit interesting name to represent the original of
replacement, What about ORIG?
> +  update_ssa (TODO_update_ssa);
> +  free_dominance_info (CDI_DOMINATORS);

If Richi is fine with SSA updating here, I think we can go this way for
now.  It is somewhat ineffective given that we update SSA after each
call site update, not only after updating them all, but we can work on
this later if this become problem.

Otherwise patch is OK
Honza


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