diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-11-17 17:48:29 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-11-17 16:48:29 +0000 |
commit | 72a4a8b0bc09f7600e05887f25de2cf9422e9d43 (patch) | |
tree | 6bf656e5818095c341835964b06853b101fed760 /gcc | |
parent | 30975f633bf33625a0e89127ac509cac22ed4837 (diff) | |
download | gcc-72a4a8b0bc09f7600e05887f25de2cf9422e9d43.zip gcc-72a4a8b0bc09f7600e05887f25de2cf9422e9d43.tar.gz gcc-72a4a8b0bc09f7600e05887f25de2cf9422e9d43.tar.bz2 |
tree.c (free_lang_data_in_decl): Annotate all functio nbodies with DECL_FUNCTION_SPECIFIC_TARGET.
* tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
DECL_FUNCTION_SPECIFIC_TARGET.
* i386.c (ix86_set_current_function): Handle explicit default options.
* lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
From-SVN: r217659
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 | ||||
-rw-r--r-- | gcc/lto/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/lto/lto.c | 9 | ||||
-rw-r--r-- | gcc/tree.c | 3 |
5 files changed, 15 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 561fc43..2660d52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-11-17 Jan Hubicka <hubicka@ucw.cz> + + * tree.c (free_lang_data_in_decl): Annotate all functio nbodies with + DECL_FUNCTION_SPECIFIC_TARGET. + * i386.c (ix86_set_current_function): Handle explicit default options. + 2014-11-17 Ilya Enkovich <ilya.enkovich@intel.com> * builtins.c (expand_builtin_memcpy_with_bounds): Use target hook diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7942cec..3166e03 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5083,7 +5083,7 @@ ix86_set_current_function (tree fndecl) if (old_tree == new_tree) ; - else if (new_tree) + else if (new_tree && new_tree != target_option_default_node) { cl_target_option_restore (&global_options, TREE_TARGET_OPTION (new_tree)); @@ -5094,7 +5094,7 @@ ix86_set_current_function (tree fndecl) = save_target_globals_default_opts (); } - else if (old_tree) + else if (old_tree && old_tree != target_option_default_node) ix86_reset_to_default_globals (); ix86_previous_fndecl = fndecl; } diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 6975042..50d32f5 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,7 @@ +2014-11-17 Jan Hubicka <hubicka@ucw.cz> + + * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET. + 2014-11-14 Jan Hubicka <hubicka@ucw.cz> * lto.c (compare_tree_sccs_1): Compare cl_target_option_eq. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index ff7f9f6..a1f109c 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1935,15 +1935,6 @@ lto_read_decls (struct lto_file_decl_data *decl_data, const void *data, 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) @@ -5115,6 +5115,9 @@ free_lang_data_in_decl (tree decl) 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. |