This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples, patch 5/7] Formal parameter use analysis
- From: Martin Jambor <mjambor at suse dot cz>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: 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>, Paolo Carlini <paolo dot carlini at oracle dot com>, Richard Guenther <rguenther at suse dot de>
- Date: Mon, 28 Jul 2008 11:41:28 +0200
- Subject: Re: [tuples, patch 5/7] Formal parameter use analysis
- References: <20080724130201.218597869@virgil.suse.cz> <20080724130310.871020115@virgil.suse.cz> <488A37CC.2030305@google.com>
Hi,
On Fri, Jul 25, 2008 at 05:30:04PM -0300, Diego Novillo wrote:
>
>> 2008-07-24 Martin Jambor <mjambor@suse.cz>
>> * cgraphbuild.c (compute_call_stmt_bb_frequency): New function.
>> (build_cgraph_edges): Call compute_call_stmt_bb_frequency instead
>> of computing the frequency separately.
>> (rebuild_cgraph_edges): Call compute_call_stmt_bb_frequency instead
>> of computing the frequency separately.
>> * ipa-cp.c (ipcp_print_all_structures): Replace a call to
>> ipa_print_all_param_modified with a call to ipa_print_all_param_flags.
>> * ipa-prop.c (ipa_get_member_ptr_load_param): New function.
>> (ipa_get_stmt_member_ptr_load_param): New function.
>> (ipa_is_ssa_with_stmt_def): New function.
>> (ipa_note_param_call): New function.
>> (ipa_analyze_call_uses): New function.
>> (ipa_analyze_stmt_uses): New function.
>> (ipa_analyze_params_uses): New function.
>> (ipa_free_node_params_substructures): Also free the param_calls linked
>> list.
>> (ipa_node_duplication_hook): Also duplicate the param_calls linked list.
>> (ipa_print_node_param_flags): New function.
>> (ipa_print_all_params_modified): Renamed to ipa_print_all_param_flags.
>> (ipa_print_all_param_flags): Calls ipa_print_node_param_flags.
>> * ipa-prop.h (struct ipa_param_flags): New field called.
>> (struct ipa_param_call_note): New structure.
>> (struct ipa_node_params): New fields param_calls and
>> uses_analysis_done.
>> (ipa_is_ith_param_called): New function.
>> * ipa-inline.c (inline_indirect_intraprocedural_analysis): Call
>> ipa_analyze_params_uses and dump parameter flags.
>
> The function ipa_analyze_call_uses seems a bit brittle. It seems to rely
> on pattern matching, but I guess there aren't very many options here.
Yes it is brittle but I have added a test case so that we find out
early if things break. No, I could not really think about any other
option, other than changing the representation of member pointers in
the middle end, and that seems too far-fetched.
>
> What happened with PR 36926, did your changes work?
Yes, they did.
> Other than that, the tuples conversion looks fine.
Thanks a lot,
Martin