diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-11-15 17:53:51 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-11-15 16:53:51 +0000 |
commit | ca9a04dab65aa459a69364376e4fd6188f5f78a3 (patch) | |
tree | 76e6169e67fc97082991b66e36d3b94491a938ca /gcc/tree-streamer-out.c | |
parent | 64ec531860ae0632d2e02cf545e1b2f99aa32b44 (diff) | |
download | gcc-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-out.c')
-rw-r--r-- | gcc/tree-streamer-out.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 41dca6e..f735b56 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -363,24 +363,6 @@ pack_ts_translation_unit_decl_value_fields (struct output_block *ob, bp_pack_string (ob, bp, TRANSLATION_UNIT_LANGUAGE (expr), true); } -/* Pack a TS_OPTIMIZATION tree in EXPR to BP. */ - -static void -pack_ts_optimization (struct bitpack_d *bp, tree expr) -{ - struct cl_optimization *t = TREE_OPTIMIZATION (expr); - unsigned i, len; - - /* The cl_optimization is generated by the options - awk script, so we just recreate a byte-by-byte copy here. */ - - len = sizeof (struct cl_optimization); - for (i = 0; i < len; i++) - bp_pack_value (bp, ((unsigned char *)t)[i], 8); - /* Catch struct size mismatches between reader and writer. */ - bp_pack_value (bp, 0x12345678, 32); -} - /* Pack all the non-pointer fields of the TS_OMP_CLAUSE structure of expression EXPR into bitpack BP. */ @@ -473,7 +455,7 @@ streamer_pack_tree_bitfields (struct output_block *ob, pack_ts_translation_unit_decl_value_fields (ob, bp, expr); if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION)) - pack_ts_optimization (bp, expr); + cl_optimization_stream_out (bp, TREE_OPTIMIZATION (expr)); if (CODE_CONTAINS_STRUCT (code, TS_BINFO)) bp_pack_var_len_unsigned (bp, vec_safe_length (BINFO_BASE_ACCESSES (expr))); |