diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-14 18:54:17 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-14 18:54:17 +0000 |
commit | 30baba90876315f244564139b4dbd608583f01f1 (patch) | |
tree | 1c5576f53e0b1246f2c6689424de8733223cce84 /gcc/ipa-prop.c | |
parent | b784aaebdb576e4315aae6c520c752bd1ea4286e (diff) | |
download | gcc-30baba90876315f244564139b4dbd608583f01f1.tar.gz |
2010-06-14 Richard Guenther <rguenther@suse.de>
* lto-streamer.c (cached_bp): Remove.
(bitpack_delete): Likewise.
(bitpack_create): Likewise.
(bp_get_next_word): Likewise.
(bp_pack_value, bp_unpack_value): Move ...
* lto-streamer.h (bp_pack_value, bp_unpack_value): ... here.
Re-implement.
(struct bitpack_d): Likewise.
(bitpack_create, lto_output_bitpack, lto_input_bitpack):
New inline functions.
* lto-streamer-out.c (lto_output_bitpack): Remove.
(pack_ts_base_value_fields): Adjust. Avoid conditional
bitpacking.
(pack_value_fields): Adjust.
(lto_write_tree): Likewise.
(output_gimple_stmt): Likewise.
(output_function): Likewise.
* lto-streamer-in.c (input_gimple_stmt): Adjust.
(input_function): Likewise.
(unpack_ts_base_value_fields): Adjust. Avoid conditional
bitpacking.
(lto_input_bitpack): Remove.
(lto_materialize_tree): Adjust.
* Makefile.in (ipa-prop.o): Add $(LTO_STREAMER_H) dependency.
* lto-cgraph.c (lto_output_edge): Adjust.
(lto_output_node): Likewise.
(lto_output_varpool_node): Likewise.
(lto_output_ref): Likewise.
(input_node): Likewise.
(input_varpool_node): Likewise.
(input_ref): Likewise.
(input_edge): Likewise.
(output_node_opt_summary): Likewise.
(input_node_opt_summary): Likewise.
* ipa-pure-const.c (pure_const_write_summary): Likewise.
(pure_const_read_summary): Likewise.
* ipa-prop.c (ipa_write_indirect_edge_info): Likewise.
(ipa_read_indirect_edge_info): Likewise.
(ipa_write_node_info): Likewise.
(ipa_read_node_info): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 6aeca33ca80..38eb3c08388 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2403,14 +2403,13 @@ ipa_write_indirect_edge_info (struct output_block *ob, struct cgraph_edge *cs) { struct cgraph_indirect_call_info *ii = cs->indirect_info; - struct bitpack_d *bp; + struct bitpack_d bp; lto_output_sleb128_stream (ob->main_stream, ii->param_index); lto_output_sleb128_stream (ob->main_stream, ii->anc_offset); - bp = bitpack_create (); - bp_pack_value (bp, ii->polymorphic, 1); - lto_output_bitpack (ob->main_stream, bp); - bitpack_delete (bp); + bp = bitpack_create (ob->main_stream); + bp_pack_value (&bp, ii->polymorphic, 1); + lto_output_bitpack (&bp); if (ii->polymorphic) { @@ -2428,13 +2427,12 @@ ipa_read_indirect_edge_info (struct lto_input_block *ib, struct cgraph_edge *cs) { struct cgraph_indirect_call_info *ii = cs->indirect_info; - struct bitpack_d *bp; + struct bitpack_d bp; ii->param_index = (int) lto_input_sleb128 (ib); ii->anc_offset = (HOST_WIDE_INT) lto_input_sleb128 (ib); bp = lto_input_bitpack (ib); - ii->polymorphic = bp_unpack_value (bp, 1); - bitpack_delete (bp); + ii->polymorphic = bp_unpack_value (&bp, 1); if (ii->polymorphic) { ii->otr_token = (HOST_WIDE_INT) lto_input_sleb128 (ib); @@ -2452,26 +2450,25 @@ ipa_write_node_info (struct output_block *ob, struct cgraph_node *node) struct ipa_node_params *info = IPA_NODE_REF (node); int j; struct cgraph_edge *e; - struct bitpack_d *bp; + struct bitpack_d bp; encoder = ob->decl_state->cgraph_node_encoder; node_ref = lto_cgraph_encoder_encode (encoder, node); lto_output_uleb128_stream (ob->main_stream, node_ref); - bp = bitpack_create (); - bp_pack_value (bp, info->called_with_var_arguments, 1); - bp_pack_value (bp, info->uses_analysis_done, 1); + bp = bitpack_create (ob->main_stream); + bp_pack_value (&bp, info->called_with_var_arguments, 1); + bp_pack_value (&bp, info->uses_analysis_done, 1); gcc_assert (info->modification_analysis_done || ipa_get_param_count (info) == 0); gcc_assert (!info->node_enqueued); gcc_assert (!info->ipcp_orig_node); for (j = 0; j < ipa_get_param_count (info); j++) { - bp_pack_value (bp, info->params[j].modified, 1); - bp_pack_value (bp, info->params[j].used, 1); + bp_pack_value (&bp, info->params[j].modified, 1); + bp_pack_value (&bp, info->params[j].used, 1); } - lto_output_bitpack (ob->main_stream, bp); - bitpack_delete (bp); + lto_output_bitpack (&bp); for (e = node->callees; e; e = e->next_callee) { struct ipa_edge_args *args = IPA_EDGE_REF (e); @@ -2494,13 +2491,13 @@ ipa_read_node_info (struct lto_input_block *ib, struct cgraph_node *node, struct ipa_node_params *info = IPA_NODE_REF (node); int k; struct cgraph_edge *e; - struct bitpack_d *bp; + struct bitpack_d bp; ipa_initialize_node_params (node); bp = lto_input_bitpack (ib); - info->called_with_var_arguments = bp_unpack_value (bp, 1); - info->uses_analysis_done = bp_unpack_value (bp, 1); + info->called_with_var_arguments = bp_unpack_value (&bp, 1); + info->uses_analysis_done = bp_unpack_value (&bp, 1); if (ipa_get_param_count (info) != 0) { info->modification_analysis_done = true; @@ -2509,10 +2506,9 @@ ipa_read_node_info (struct lto_input_block *ib, struct cgraph_node *node, info->node_enqueued = false; for (k = 0; k < ipa_get_param_count (info); k++) { - info->params[k].modified = bp_unpack_value (bp, 1); - info->params[k].used = bp_unpack_value (bp, 1); + info->params[k].modified = bp_unpack_value (&bp, 1); + info->params[k].used = bp_unpack_value (&bp, 1); } - bitpack_delete (bp); for (e = node->callees; e; e = e->next_callee) { struct ipa_edge_args *args = IPA_EDGE_REF (e); |