diff options
author | Tom de Vries <tom@codesourcery.com> | 2017-08-03 11:37:55 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2017-08-03 11:37:55 +0000 |
commit | 3cd361256dc895fb91f5a8d248a5bbc89457621b (patch) | |
tree | 7a46500d7d147d0b042f20b7819e130c4e520705 /gcc | |
parent | cad136a40be14f1a286bbdfa8008909d262c551c (diff) | |
download | gcc-3cd361256dc895fb91f5a8d248a5bbc89457621b.zip gcc-3cd361256dc895fb91f5a8d248a5bbc89457621b.tar.gz gcc-3cd361256dc895fb91f5a8d248a5bbc89457621b.tar.bz2 |
Apply finish_options on DECL_FUNCTION_SPECIFIC_OPTIMIZATION for ACCEL_COMPILER
2017-08-03 Tom de Vries <tom@codesourcery.com>
PR lto/81430
* tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
ACCEL_COMPILER, apply finish_options on
DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
From-SVN: r250852
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree-streamer-in.c | 16 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0449bfc..d2cd6b4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2017-08-03 Tom de Vries <tom@codesourcery.com> + PR lto/81430 + * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If + ACCEL_COMPILER, apply finish_options on + DECL_FUNCTION_SPECIFIC_OPTIMIZATION. + +2017-08-03 Tom de Vries <tom@codesourcery.com> + PR target/81662 * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if function_entry_patch_area_size > 0. diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index d7b6d22..eb41e75 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see #include "ipa-chkp.h" #include "gomp-constants.h" #include "asan.h" +#include "opts.h" /* Read a STRING_CST from the string table in DATA_IN using input @@ -769,6 +770,21 @@ lto_input_ts_function_decl_tree_pointers (struct lto_input_block *ib, DECL_FUNCTION_SPECIFIC_TARGET (expr) = stream_read_tree (ib, data_in); #endif DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr) = stream_read_tree (ib, data_in); +#ifdef ACCEL_COMPILER + { + tree opts = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr); + if (opts) + { + struct gcc_options tmp; + init_options_struct (&tmp, NULL); + cl_optimization_restore (&tmp, TREE_OPTIMIZATION (opts)); + finish_options (&tmp, &global_options_set, UNKNOWN_LOCATION); + opts = build_optimization_node (&tmp); + finalize_options_struct (&tmp); + DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr) = opts; + } + } +#endif /* If the file contains a function with an EH personality set, then it was compiled with -fexceptions. In that case, initialize |