aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-in.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-11-15 17:53:51 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2014-11-15 16:53:51 +0000
commitca9a04dab65aa459a69364376e4fd6188f5f78a3 (patch)
tree76e6169e67fc97082991b66e36d3b94491a938ca /gcc/tree-streamer-in.c
parent64ec531860ae0632d2e02cf545e1b2f99aa32b44 (diff)
downloadgcc-ca9a04dab65aa459a69364376e4fd6188f5f78a3.zip
gcc-ca9a04dab65aa459a69364376e4fd6188f5f78a3.tar.gz
gcc-ca9a04dab65aa459a69364376e4fd6188f5f78a3.tar.bz2
lto-streamer-out.c (hash_tree): Use cl_optimization_hash.
* lto-streamer-out.c (hash_tree): Use cl_optimization_hash. * lto-streamer.h (cl_optimization_stream_out, cl_optimization_stream_in): Declare. * optc-save-gen.awk: Generate cl_optimization LTO streaming and hashing routines. * opth-gen.awk: Add prototype of cl_optimization_hash. * tree-streamer-in.c (unpack_ts_optimization): Remove. (streamer_unpack_tree_bitfields): Use cl_optimization_stream_in. * tree-streamer-out.c (pack_ts_optimization): Remove. (streamer_pack_tree_bitfields): Use cl_optimization_stream_out. From-SVN: r217607
Diffstat (limited to 'gcc/tree-streamer-in.c')
-rw-r--r--gcc/tree-streamer-in.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index c63bc60..a11a46e 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -399,21 +399,6 @@ unpack_ts_translation_unit_decl_value_fields (struct data_in *data_in,
vec_safe_push (all_translation_units, expr);
}
-/* Unpack a TS_OPTIMIZATION tree from BP into EXPR. */
-
-static void
-unpack_ts_optimization (struct bitpack_d *bp, tree expr)
-{
- unsigned i, len;
- struct cl_optimization *t = TREE_OPTIMIZATION (expr);
-
- len = sizeof (struct cl_optimization);
- for (i = 0; i < len; i++)
- ((unsigned char *)t)[i] = bp_unpack_value (bp, 8);
- if (bp_unpack_value (bp, 32) != 0x12345678)
- fatal_error ("cl_optimization size mismatch in LTO reader and writer");
-}
-
/* Unpack all the non-pointer fields of the TS_OMP_CLAUSE
structure of expression EXPR from bitpack BP. */
@@ -507,7 +492,7 @@ unpack_value_fields (struct data_in *data_in, struct bitpack_d *bp, tree expr)
unpack_ts_translation_unit_decl_value_fields (data_in, bp, expr);
if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION))
- unpack_ts_optimization (bp, expr);
+ cl_optimization_stream_in (bp, TREE_OPTIMIZATION (expr));
if (CODE_CONTAINS_STRUCT (code, TS_BINFO))
{