[tree profiling branch] Various fixes, cleanups to ipcp and versioning code
Jan Hubicka
jh@suse.cz
Thu May 5 11:06:00 GMT 2005
> Hello,
>
> Attached are several fixes and cleanups to both ipcp and versioning code.
> The main changes for ipcp include code handling cases in which the
> constant sent by the callsite and the
> formal parameter of the callee are not of the same type. (could happen for
> old C style cases)
> Also, added some cleanups in the code dealing with building of constants.
> For versioning code, added some cleanups and a fix in copy_decl_for_dup to
> clear the LABEL_DECL_UID also for the case of versioning.
>
> Comments are welcome.
This looks OK to me thanks.
> /* Copy the function's static chain. */
> p = DECL_STRUCT_FUNCTION (old_decl)->static_chain_decl;
> if (p)
> ! DECL_STRUCT_FUNCTION (new_decl)->static_chain_decl =
> ! copy_static_chain (DECL_STRUCT_FUNCTION
> (old_decl)->static_chain_decl,
> ! &id);
Do we actually need to play around with static_chain_decl now when
nested functions are lowered?
Honza
> /* Copy the function's arguments. */
> if (DECL_ARGUMENTS (old_decl) != NULL_TREE)
> ! DECL_ARGUMENTS (new_decl) =
> ! copy_arguments_for_versioning (DECL_ARGUMENTS (old_decl), &id);
> ! if (tree_map)
> ! for (i = 0; i < VARRAY_ACTIVE_SIZE (tree_map); i++)
> ! {
> ! replace_info = VARRAY_GENERIC_PTR (tree_map, i);
> ! if (replace_info->replace_p && !replace_info->ref_p)
> ! insert_decl_map (&id, replace_info->old_tree,
> replace_info->new_tree);
> ! else if (replace_info->replace_p && replace_info->ref_p)
> ! id.ipa_info =tree_ map;
> ! }
> if (DECL_STRUCT_FUNCTION (old_decl)->unexpanded_var_list != NULL_TREE)
> ! DECL_STRUCT_FUNCTION (new_decl)->unexpanded_var_list =
> ! copy_local_vars (DECL_STRUCT_FUNCTION
> (old_decl)->unexpanded_var_list,
> ! &id);
> /* Copy the Function's body. */
> old_entry_block = ENTRY_BLOCK_PTR_FOR_FUNCTION
> (DECL_STRUCT_FUNCTION (old_decl));
> *************** replace_ref_tree (inline_data *id, tree*
> *** 2940,2946 ****
>
> for (i = 0; i < VARRAY_ACTIVE_SIZE (id->ipa_info); i++)
> {
> ! struct ipcp_replace_map *replace_info;
> replace_info = VARRAY_GENERIC_PTR (id->ipa_info, i);
>
> if (replace_info->replace_p && replace_info->ref_p)
> --- 2933,2939 ----
>
> for (i = 0; i < VARRAY_ACTIVE_SIZE (id->ipa_info); i++)
> {
> ! struct ipa_replace_map *replace_info;
> replace_info = VARRAY_GENERIC_PTR (id->ipa_info, i);
>
> if (replace_info->replace_p && replace_info->ref_p)
> Index: testsuite/lib/scancgraph.exp
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/testsuite/lib/Attic/scancgraph.exp,v
> retrieving revision 1.1.2.1
> diff -c -3 -p -r1.1.2.1 scancgraph.exp
> *** testsuite/lib/scancgraph.exp 10 Feb 2005 23:26:55 -0000 1.1.2.1
> --- testsuite/lib/scancgraph.exp 5 May 2005 10:03:18 -0000
> *************** proc scan-ipa-dump-times { args } {
> *** 49,55 ****
> upvar 2 name testcase
>
> # This must match the rule in gcc-dg.exp.
> ! set output_file "[glob [file tail $testcase].i02.[lindex $args 2]]"
>
> set fd [open $output_file r]
> set text [read $fd]
> --- 49,55 ----
> upvar 2 name testcase
>
> # This must match the rule in gcc-dg.exp.
> ! set output_file "[glob [file tail $testcase].i??.[lindex $args 2]]"
>
> set fd [open $output_file r]
> set text [read $fd]
>
>
>
>
More information about the Gcc-patches
mailing list