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: Drop target_option_node reconstruction logic.


On November 14, 2014 8:13:15 PM CET, Jan Hubicka <hubicka@ucw.cz> wrote:
>Hi,
>this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET
>from target
>attributes.  This code was never complete and it should be no-op now
>when we save
>tehe target nodes.
>It also makes free_land_data_in_decl to actually anotate all function
>bodies with
>a default option node.  The reason is that when LTOint units, one
>compiled with
>default settings and one, say with -msse3, we want ot keep these
>functions preserved.
>
>Incrementally i will proceed with similar changes for optimization
>nodes.
>
>Bootstrapped/regtested ppc64-linux, earlier version tested at
>x86_64-linux and
>firefox LTO, OK?

OK.

Thanks,
Richard.

>Honza
>
>	* lto.c (lto_read_decls): Do not rebuild
>DECL_FUNCTION_SPECIFIC_TARGET.
>	* tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
>	DECL_FUNCTION_SPECIFIC_TARGET.
>Index: lto/lto.c
>===================================================================
>--- lto/lto.c	(revision 217571)
>+++ lto/lto.c	(working copy)
>@@ -1935,15 +1935,6 @@
> 	      if (TREE_CODE (t) == INTEGER_CST
> 		  && !TREE_OVERFLOW (t))
> 		cache_integer_cst (t);
>-	      /* Re-build DECL_FUNCTION_SPECIFIC_TARGET, we need that
>-	         for both WPA and LTRANS stage.  */
>-	      if (TREE_CODE (t) == FUNCTION_DECL)
>-		{
>-		  tree attr = lookup_attribute ("target", DECL_ATTRIBUTES (t));
>-		  if (attr)
>-		    targetm.target_option.valid_attribute_p
>-			(t, NULL_TREE, TREE_VALUE (attr), 0);
>-		}
> 	      /* Register TYPE_DECLs with the debuginfo machinery.  */
> 	      if (!flag_wpa
> 		  && TREE_CODE (t) == TYPE_DECL)
>Index: tree.c
>===================================================================
>--- tree.c	(revision 217571)
>+++ tree.c	(working copy)
>@@ -5115,6 +5115,9 @@
> 	     the PARM_DECL will be used in the function's body).  */
> 	  for (t = DECL_ARGUMENTS (decl); t; t = TREE_CHAIN (t))
> 	    DECL_CONTEXT (t) = decl;
>+	  if (!DECL_FUNCTION_SPECIFIC_TARGET (decl))
>+	    DECL_FUNCTION_SPECIFIC_TARGET (decl)
>+	      = target_option_default_node;
> 	}
> 
>       /* DECL_SAVED_TREE holds the GENERIC representation for DECL.



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