This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: IPCP & versioning additions and fixes for tree profiling branch
- From: Jan Hubicka <jh at suse dot cz>
- To: Razya Ladelsky <RAZYA at il dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, stevenb at suse dot de, hubicka at ucw dot cz,Mircea Namolaru <NAMOLARU at il dot ibm dot com>, Ayal Zaks <ZAKS at il dot ibm dot com>,jh at suse dot cz
- Date: Sun, 20 Mar 2005 16:21:28 +0100
- Subject: Re: IPCP & versioning additions and fixes for tree profiling branch
- References: <OF37280C9D.9F07E1A7-ONC2256FCA.0038D2C0-C2256FCA.003B04E9@il.ibm.com>
> Hello,
>
> Attached are several additions and fixes to ipcp and versioning code.
>
> Comments are welcome,
> Thanks,
> Razya
>
> 2005-03-20 Razya Ladelsky <razya@il.ibm.com>
>
> * cgraphunit.c (cgraph_function_versioning): assign proper values to the
> TREE_DECL fields of the new version.
> * gimplify.c (create_function_name): changed code to create a unique name
> for the versioned node.
> * ipa_prop.c (constant_val_insert ): enable the insertion of the constant
> to the (versioned) function.
> (ipcp_cval_equal_cvalues): fix float constant comparison.
>
> Index: cgraphunit.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
> retrieving revision 1.1.4.35.2.44
> diff -c -3 -p -r1.1.4.35.2.44 cgraphunit.c
> *** cgraphunit.c 4 Mar 2005 21:25:59 -0000 1.1.4.35.2.44
> --- cgraphunit.c 20 Mar 2005 10:01:52 -0000
> *************** cgraph_function_versioning (struct cgrap
> *** 1473,1478 ****
> --- 1473,1493 ----
> /* Update the call_expr on the edges
> to the new version node. */
> update_call_expr (new_version_node, redirect_callers);
> + if (new_version_node && DECL_EXTERNAL (new_version_node->decl))
> + DECL_EXTERNAL (new_version_node->decl) = 0;
> + if (DECL_ONE_ONLY (new_version_node->decl))
> + DECL_ONE_ONLY (new_version_node->decl) = 0;
> + if (TREE_PUBLIC (new_version_node->decl))
> + TREE_PUBLIC (new_version_node->decl) = 0;
> + if (DECL_COMDAT (new_version_node->decl))
> + DECL_COMDAT (new_version_node->decl) = 0;
> + new_version_node->local.externally_visible = 0;
> + new_version_node->local.local = 1;
> + new_version_node->local.avail = AVAIL_LOCAL;
> + if (TREE_ADDRESSABLE (new_version_node->decl))
> + TREE_ADDRESSABLE (new_version_node->decl) = 0;
> + if (new_version_node->needed)
> + abort ();
gcc_assert here. WHat is the reason for this check anyway?
otherwise this change is fine as well as the ipa-prop one.
> return new_version_node;
> }
>
> Index: gimplify.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/gimplify.c,v
> retrieving revision 1.1.2.141.2.21
> diff -c -3 -p -r1.1.2.141.2.21 gimplify.c
> *** gimplify.c 1 Mar 2005 23:08:02 -0000 1.1.2.141.2.21
> --- gimplify.c 20 Mar 2005 10:01:53 -0000
> *************** create_function_name (const char *prefix
> *** 337,343 ****
> len = strlen (tmp_name);
> for (i=0; i < len; i++)
> {
> ! if (tmp_name[i] == '.')
> tmp_name[i] = '_';
> }
>
> --- 337,343 ----
> len = strlen (tmp_name);
> for (i=0; i < len; i++)
> {
> ! if (!ISALPHA (tmp_name[i]) && !ISDIGIT (tmp_name[i]) &&
> tmp_name[i] != '.')
> tmp_name[i] = '_';
What exactly this is shooting for? Won't we run into unwanted
collisions or something like that?
Honza