This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Drop target_option_node reconstruction logic.
- From: Richard Biener <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>,gcc-patches at gcc dot gnu dot org
- Date: Sat, 15 Nov 2014 10:43:03 +0100
- Subject: Re: Drop target_option_node reconstruction logic.
- Authentication-results: sourceware.org; auth=none
- References: <20141114191315 dot GB6818 at kam dot mff dot cuni dot cz>
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.