diff options
author | Richard Biener <rguenther@suse.de> | 2012-10-10 14:27:59 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-10-10 14:27:59 +0000 |
commit | 7cb7d208bb9e7811a2343d018ec196b59d6e1998 (patch) | |
tree | 3534db32ee5430daa60040a605add057d9c96f94 /gcc/lto-streamer-out.c | |
parent | 8fc5b387d7eeeffbaf6955920fb0e70d2bcd563b (diff) | |
download | gcc-7cb7d208bb9e7811a2343d018ec196b59d6e1998.zip gcc-7cb7d208bb9e7811a2343d018ec196b59d6e1998.tar.gz gcc-7cb7d208bb9e7811a2343d018ec196b59d6e1998.tar.bz2 |
lto-streamer-in.c (lto_input_location_bitpack): Rename to ...
2012-10-10 Richard Biener <rguenther@suse.de>
* lto-streamer-in.c (lto_input_location_bitpack): Rename to ...
(lto_input_location): ... this. Kill original.
(input_eh_region): Adjust.
(input_struct_function_base): Likewise.
(lto_read_tree): Likewise.
* lto-streamer-out.c (lto_output_location_bitpack): Rename to ...
(lto_output_location): ... this. Kill original.
(lto_write_tree): Adjust.
(output_eh_region): Likewise.
(output_struct_function_base): Likewise.
* lto-streamer.c (lto_streamer_hooks_init): Initialize location
hooks.
* lto-streamer.h (lto_input_location): Adjust prototype.
(lto_output_location): Likewise.
* streamer-hooks.h (struct streamer_hooks): Adjust prototype
of input_location and output_location hooks.
(stream_input_location): New define.
(stream_output_location): Likewise.
* tree-streamer-in.c (unpack_ts_block_value_fields): Adjust.
(unpack_value_fields): Likewise.
(streamer_read_tree_bitfields): Likewise.
(lto_input_ts_decl_minimal_tree_pointers): Likewise.
(lto_input_ts_exp_tree_pointers): Likewise.
(lto_input_ts_block_tree_pointers): Likewise.
* tree-streamer-out.c (pack_ts_block_value_fields): Adjust.
(streamer_pack_tree_bitfields): Likewise.
(write_ts_decl_minimal_tree_pointers): Likewise.
(write_ts_exp_tree_pointers): Likewise.
(write_ts_block_tree_pointers): Likewise.
* gimple-streamer-in.c (input_phi): Adjust.
(input_gimple_stmt): Likewise.
* gimple-streamer-out.c (output_phi): Adjust.
(output_gimple_stmt): Likewise.
* tree-streamer.h (streamer_read_tree_bitfields): Adjust prototype.
(streamer_pack_tree_bitfields): Likewise.
From-SVN: r192317
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 083db74..55a20dd 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -148,10 +148,9 @@ tree_is_indexable (tree t) After outputting bitpack, lto_output_location_data has to be done to output actual data. */ -static inline void -lto_output_location_bitpack (struct bitpack_d *bp, - struct output_block *ob, - location_t loc) +void +lto_output_location (struct output_block *ob, struct bitpack_d *bp, + location_t loc) { expanded_location xloc; @@ -182,25 +181,6 @@ lto_output_location_bitpack (struct bitpack_d *bp, } -/* Emit location LOC to output block OB. - If the output_location streamer hook exists, call it. - Otherwise, when bitpack is handy, it is more space efficient to call - lto_output_location_bitpack with existing bitpack. */ - -void -lto_output_location (struct output_block *ob, location_t loc) -{ - if (streamer_hooks.output_location) - streamer_hooks.output_location (ob, loc); - else - { - struct bitpack_d bp = bitpack_create (ob->main_stream); - lto_output_location_bitpack (&bp, ob, loc); - streamer_write_bitpack (&bp); - } -} - - /* If EXPR is an indexable tree node, output a reference to it to output block OB. Otherwise, output the physical representation of EXPR to OB. */ @@ -333,7 +313,7 @@ lto_write_tree (struct output_block *ob, tree expr, bool ref_p) /* Pack all the non-pointer fields in EXPR into a bitpack and write the resulting bitpack. */ bp = bitpack_create (ob->main_stream); - streamer_pack_tree_bitfields (&bp, expr); + streamer_pack_tree_bitfields (ob, &bp, expr); streamer_write_bitpack (&bp); /* Write all the pointer fields in EXPR. */ @@ -505,7 +485,9 @@ output_eh_region (struct output_block *ob, eh_region r) else if (r->type == ERT_MUST_NOT_THROW) { stream_write_tree (ob, r->u.must_not_throw.failure_decl, true); - lto_output_location (ob, r->u.must_not_throw.failure_loc); + bitpack_d bp = bitpack_create (ob->main_stream); + stream_output_location (ob, &bp, r->u.must_not_throw.failure_loc); + streamer_write_bitpack (&bp); } if (r->landing_pads) @@ -751,10 +733,6 @@ output_struct_function_base (struct output_block *ob, struct function *fn) FOR_EACH_VEC_ELT (tree, fn->local_decls, i, t) stream_write_tree (ob, t, true); - /* Output the function start and end loci. */ - lto_output_location (ob, fn->function_start_locus); - lto_output_location (ob, fn->function_end_locus); - /* Output current IL state of the function. */ streamer_write_uhwi (ob, fn->curr_properties); @@ -774,6 +752,11 @@ output_struct_function_base (struct output_block *ob, struct function *fn) bp_pack_value (&bp, fn->calls_setjmp, 1); bp_pack_value (&bp, fn->va_list_fpr_size, 8); bp_pack_value (&bp, fn->va_list_gpr_size, 8); + + /* Output the function start and end loci. */ + stream_output_location (ob, &bp, fn->function_start_locus); + stream_output_location (ob, &bp, fn->function_end_locus); + streamer_write_bitpack (&bp); } |