This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, pretty-ipa merge 1/4] Function parameter manipulation infrastructer through param notes
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>, Richard Guenther <rguenther at suse dot de>
- Date: Fri, 3 Jul 2009 14:07:14 +0200
- Subject: Re: [PATCH, pretty-ipa merge 1/4] Function parameter manipulation infrastructer through param notes
- References: <20090624112042.791734971@virgil.suse.cz> <20090624112115.721639194@virgil.suse.cz> <20090625164429.GB22523@virgil.suse.cz> <20090626131927.GA12278@atrey.karlin.mff.cuni.cz> <20090701164420.GA4498@virgil.suse.cz>
> 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