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: IPCP & versioning additions and fixes for tree profiling branch


> 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


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