summaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-streamer-out.c')
-rw-r--r--gcc/tree-streamer-out.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c
index 41dca6e6abd..f735b567421 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)));