optc-save-gen.awk: Output cl_target_option_eq...
authorJan Hubicka <hubicka@gcc.gnu.org>
Fri, 14 Nov 2014 15:48:47 +0000 (15:48 +0000)
committerJan Hubicka <hubicka@gcc.gnu.org>
Fri, 14 Nov 2014 15:48:47 +0000 (15:48 +0000)
* optc-save-gen.awk: Output cl_target_option_eq,
cl_target_option_hash, cl_target_option_stream_out,
cl_target_option_stream_in functions.
* opth-gen.awk: Output prototypes for
cl_target_option_eq and cl_target_option_hash.
* lto-streamer.h (cl_target_option_stream_out,
cl_target_option_stream_in): Declare.
* tree.c (cl_option_hash_hash): Use cl_target_option_hash.
(cl_option_hash_eq): Use cl_target_option_eq.
* tree-streamer-in.c (unpack_value_fields): Stream in
TREE_TARGET_OPTION.
* lto-streamer-out.c (DFS::DFS_write_tree_body): Follow
DECL_FUNCTION_SPECIFIC_TARGET.
(hash_tree): Hash TREE_TARGET_OPTION; visit
DECL_FUNCTION_SPECIFIC_TARGET.
* tree-streamer-out.c (streamer_pack_tree_bitfields): Skip
TS_TARGET_OPTION.
(streamer_write_tree_body): Output TS_TARGET_OPTION.

* lto.c (compare_tree_sccs_1): Compare cl_target_option_eq.

From-SVN: r217572

gcc/lto-streamer-out.c
gcc/lto-streamer.h

index 98ee44d91cc9111ef53b01899f6a0231c5e34698..f376a30dac06057691754942dc534487604ee277 100644 (file)
@@ -594,7 +594,7 @@ DFS::DFS_write_tree_body (struct output_block *ob,
     {
       DFS_follow_tree_edge (DECL_VINDEX (expr));
       DFS_follow_tree_edge (DECL_FUNCTION_PERSONALITY (expr));
-      /* Do not DECL_FUNCTION_SPECIFIC_TARGET.  They will be regenerated.  */
+      DFS_follow_tree_edge (DECL_FUNCTION_SPECIFIC_TARGET (expr));
       DFS_follow_tree_edge (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr));
     }
 
@@ -945,7 +945,7 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map,
                        strlen (TRANSLATION_UNIT_LANGUAGE (t)));
 
   if (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION))
-    gcc_unreachable ();
+    hstate.add_wide_int (cl_target_option_hash (TREE_TARGET_OPTION (t)));
 
   if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION))
     hstate.add (t, sizeof (struct cl_optimization));
@@ -1028,7 +1028,7 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map,
     {
       visit (DECL_VINDEX (t));
       visit (DECL_FUNCTION_PERSONALITY (t));
-      /* Do not follow DECL_FUNCTION_SPECIFIC_TARGET.  */
+      visit (DECL_FUNCTION_SPECIFIC_TARGET (t));
       visit (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (t));
     }
 
index f5b67abd468efd68b13e2ddc3d651721a0ae2cf5..8e5ee628e12f9a05e26f0ac4cdc7955184e175e9 100644 (file)
@@ -836,6 +836,14 @@ bool reachable_from_this_partition_p (struct cgraph_node *,
 lto_symtab_encoder_t compute_ltrans_boundary (lto_symtab_encoder_t encoder);
 void select_what_to_stream (bool);
 
+/* In options-save.c.  */
+void cl_target_option_stream_out (struct output_block *, struct bitpack_d *,
+                                 struct cl_target_option *);
+
+void cl_target_option_stream_in (struct data_in *,
+                                struct bitpack_d *,
+                                struct cl_target_option *);
+
 
 /* In lto-symtab.c.  */
 extern void lto_symtab_merge_decls (void);