diff options
author | Diego Novillo <dnovillo@google.com> | 2011-08-12 12:42:13 -0400 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2011-08-12 12:42:13 -0400 |
commit | 412288f1c06565e8d6f96b835adc0aa915f28766 (patch) | |
tree | ef2a7dfd0af1b4be822dcf83bf3264d9f4d97d0c /gcc/ipa-prop.c | |
parent | 9b0f6f5e511ca512e4faeabc81d2fd3abad9b02f (diff) | |
download | gcc-412288f1c06565e8d6f96b835adc0aa915f28766.zip gcc-412288f1c06565e8d6f96b835adc0aa915f28766.tar.gz gcc-412288f1c06565e8d6f96b835adc0aa915f28766.tar.bz2 |
data-streamer.h (streamer_write_zero): Rename from output_zero.
* data-streamer.h (streamer_write_zero): Rename from output_zero.
(streamer_write_uhwi): Rename from lto_output_uleb128.
(streamer_write_hwi): Rename from output_sleb128.
(streamer_write_string): Rename from lto_output_string.
(streamer_string_index): Rename from lto_string_index.
(streamer_write_string_with_length): Rename from
lto_output_string_with_length.
(streamer_write_uhwi_stream): Rename from lto_output_uleb128_stream.
(streamer_write_hwi_stream): Rename from lto_output_sleb128_stream.
(streamer_read_string): Rename from lto_input_string.
(streamer_read_indexed_string): Rename from input_string_internal.
(streamer_read_uhwi): Rename from lto_input_uleb128.
(streamer_read_hwi): Rename from lto_input_sleb128.
(streamer_write_hwi_in_range): Rename from lto_output_int_in_range.
(streamer_read_hwi_in_range): Rename from lto_input_int_in_range.
(streamer_write_enum): Rename from lto_output_enum.
(streamer_read_enum): Rename from lto_input_enum.
(streamer_write_record_start): Rename from output_record_start.
(streamer_read_record_start): Rename from input_record_start.
(streamer_write_bitpack): Rename from lto_output_bitpack.
(streamer_read_bitpack): Rename from lto_input_bitpack.
(streamer_write_char_stream): Rename from lto_output_1_stream.
(streamer_read_uchar): Rename from lto_input_1_unsigned.
* tree-streamer.h (streamer_cache_d): Rename from lto_streamer_cache_d.
(streamer_handle_as_builtin_p): Rename from lto_stream_as_builtin_p.
(streamer_read_string_cst): Rename from input_string_cst.
(streamer_read_chain): Rename from lto_input_chain.
(streamer_alloc_tree): Rename from lto_materialize_tree.
(streamer_read_tree_body): Rename from lto_input_tree_pointers.
(streamer_get_pickled_tree): Rename from lto_get_pickled_tree.
(streamer_get_builtin_tree): Rename from lto_get_builtin_tree.
(streamer_read_integer_cst): Rename from lto_input_integer_cst.
(streamer_read_tree_bitfields): Rename from tree_read_bitfields.
(streamer_write_chain): Rename from lto_output_chain.
(streamer_write_tree_header): Rename from lto_output_tree_header.
(streamer_pack_tree_bitfields): Rename from pack_value_fields.
(streamer_write_tree_body): Rename from lto_output_tree_pointers.
(streamer_write_integer_cst): Rename from lto_output_integer_cst.
(streamer_write_builtin): Rename from lto_output_builtin_tree.
(streamer_check_handled_ts_structures): Rename from
check_handled_ts_structures.
(streamer_tree_cache_insert): Rename from lto_streamer_cache_insert.
(streamer_tree_cache_insert_at): Rename from
lto_streamer_cache_insert_at.
(streamer_tree_cache_append): Rename from lto_streamer_cache_append.
(streamer_tree_cache_lookup): Rename from lto_streamer_cache_lookup.
(streamer_tree_cache_get): Rename from lto_streamer_cache_get.
(streamer_tree_cache_create): Rename from lto_streamer_cache_create.
(streamer_tree_cache_delete): Rename from lto_streamer_cache_delete.
* tree-streamer-out.c (write_string_cst): Rename from output_string_cst.
(write_identifier): Rename from output_identifier.
(write_ts_common_tree_pointers): Rename from
lto_output_ts_common_tree_pointers.
(write_ts_vector_tree_pointers): Rename from
lto_output_ts_vector_tree_pointers.
(write_ts_complex_tree_pointers): Rename from
lto_output_ts_complex_tree_pointers.
(write_ts_decl_minimal_tree_pointers): Rename from
lto_output_ts_decl_minimal_tree_pointers.
(write_ts_decl_common_tree_pointers): Rename from
lto_output_ts_decl_common_tree_pointers.
(write_ts_decl_non_common_tree_pointers): Rename from
lto_output_ts_decl_non_common_tree_pointers.
(write_ts_decl_with_vis_tree_pointers): Rename from
lto_output_ts_decl_with_vis_tree_pointers.
(write_ts_field_decl_tree_pointers): Rename from
lto_output_ts_field_decl_tree_pointers.
(write_ts_function_decl_tree_pointers): Rename from
lto_output_ts_function_decl_tree_pointers.
(write_ts_type_common_tree_pointers): Rename from
lto_output_ts_type_common_tree_pointers.
(write_ts_type_non_common_tree_pointers): Rename from
lto_output_ts_type_non_common_tree_pointers.
(write_ts_list_tree_pointers): Rename from
lto_output_ts_list_tree_pointers.
(write_ts_vec_tree_pointers): Rename from
lto_output_ts_vec_tree_pointers.
(write_ts_exp_tree_pointers): Rename from
lto_output_ts_exp_tree_pointers.
(write_ts_block_tree_pointers): Rename from
lto_output_ts_block_tree_pointers.
(write_ts_binfo_tree_pointers): Rename from
lto_output_ts_binfo_tree_pointers.
(write_ts_constructor_tree_pointers): Rename from
lto_output_ts_constructor_tree_pointers.
(write_ts_target_option): Rename from
lto_output_ts_target_option.
(write_ts_translation_unit_decl_tree_pointers): Rename from
lto_output_ts_translation_unit_decl_tree_pointers.
* tree-streamer.c (streamer_tree_cache_add_to_node_array):
Rename from lto_streamer_cache_add_to_node_array.
(streamer_tree_cache_insert_1): Rename from lto_streamer_cache_insert_1.
(record_common_node): Rename from lto_record_common_node.
* streamer-hooks.h (bitpack_d, lto_streamer_cache_d): Remove forward
declarations.
* data-streamer-in.c (lto_input_widest_uint_uleb128): Remove unused
function.
* data-streamer-out.c (lto_output_widest_uint_uleb128_stream): Remove
unused function.
* Makefile.in (lto-section-out.o): Add dependency on DATA_STREAMER_H.
(ipa-reference.o): Likewise.
* lto-section-out.c: Include data-streamer.h.
* ipa-reference.c: Include data-streamer.h.
From-SVN: r177704
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 66 |
1 files changed, 30 insertions, 36 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 0997cf5..a81bb3c 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2644,8 +2644,7 @@ static void ipa_write_jump_function (struct output_block *ob, struct ipa_jump_func *jump_func) { - lto_output_uleb128_stream (ob->main_stream, - jump_func->type); + streamer_write_uhwi (ob, jump_func->type); switch (jump_func->type) { @@ -2659,17 +2658,13 @@ ipa_write_jump_function (struct output_block *ob, break; case IPA_JF_PASS_THROUGH: stream_write_tree (ob, jump_func->value.pass_through.operand, true); - lto_output_uleb128_stream (ob->main_stream, - jump_func->value.pass_through.formal_id); - lto_output_uleb128_stream (ob->main_stream, - jump_func->value.pass_through.operation); + streamer_write_uhwi (ob, jump_func->value.pass_through.formal_id); + streamer_write_uhwi (ob, jump_func->value.pass_through.operation); break; case IPA_JF_ANCESTOR: - lto_output_uleb128_stream (ob->main_stream, - jump_func->value.ancestor.offset); + streamer_write_uhwi (ob, jump_func->value.ancestor.offset); stream_write_tree (ob, jump_func->value.ancestor.type, true); - lto_output_uleb128_stream (ob->main_stream, - jump_func->value.ancestor.formal_id); + streamer_write_uhwi (ob, jump_func->value.ancestor.formal_id); break; case IPA_JF_CONST_MEMBER_PTR: stream_write_tree (ob, jump_func->value.member_cst.pfn, true); @@ -2685,7 +2680,7 @@ ipa_read_jump_function (struct lto_input_block *ib, struct ipa_jump_func *jump_func, struct data_in *data_in) { - jump_func->type = (enum jump_func_type) lto_input_uleb128 (ib); + jump_func->type = (enum jump_func_type) streamer_read_uhwi (ib); switch (jump_func->type) { @@ -2699,13 +2694,14 @@ ipa_read_jump_function (struct lto_input_block *ib, break; case IPA_JF_PASS_THROUGH: jump_func->value.pass_through.operand = stream_read_tree (ib, data_in); - jump_func->value.pass_through.formal_id = lto_input_uleb128 (ib); - jump_func->value.pass_through.operation = (enum tree_code) lto_input_uleb128 (ib); + jump_func->value.pass_through.formal_id = streamer_read_uhwi (ib); + jump_func->value.pass_through.operation + = (enum tree_code) streamer_read_uhwi (ib); break; case IPA_JF_ANCESTOR: - jump_func->value.ancestor.offset = lto_input_uleb128 (ib); + jump_func->value.ancestor.offset = streamer_read_uhwi (ib); jump_func->value.ancestor.type = stream_read_tree (ib, data_in); - jump_func->value.ancestor.formal_id = lto_input_uleb128 (ib); + jump_func->value.ancestor.formal_id = streamer_read_uhwi (ib); break; case IPA_JF_CONST_MEMBER_PTR: jump_func->value.member_cst.pfn = stream_read_tree (ib, data_in); @@ -2724,15 +2720,15 @@ ipa_write_indirect_edge_info (struct output_block *ob, struct cgraph_indirect_call_info *ii = cs->indirect_info; struct bitpack_d bp; - lto_output_sleb128_stream (ob->main_stream, ii->param_index); - lto_output_sleb128_stream (ob->main_stream, ii->anc_offset); + streamer_write_hwi (ob, ii->param_index); + streamer_write_hwi (ob, ii->anc_offset); bp = bitpack_create (ob->main_stream); bp_pack_value (&bp, ii->polymorphic, 1); - lto_output_bitpack (&bp); + streamer_write_bitpack (&bp); if (ii->polymorphic) { - lto_output_sleb128_stream (ob->main_stream, ii->otr_token); + streamer_write_hwi (ob, ii->otr_token); stream_write_tree (ob, ii->otr_type, true); } } @@ -2748,13 +2744,13 @@ ipa_read_indirect_edge_info (struct lto_input_block *ib, struct cgraph_indirect_call_info *ii = cs->indirect_info; 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->param_index = (int) streamer_read_hwi (ib); + ii->anc_offset = (HOST_WIDE_INT) streamer_read_hwi (ib); + bp = streamer_read_bitpack (ib); ii->polymorphic = bp_unpack_value (&bp, 1); if (ii->polymorphic) { - ii->otr_token = (HOST_WIDE_INT) lto_input_sleb128 (ib); + ii->otr_token = (HOST_WIDE_INT) streamer_read_hwi (ib); ii->otr_type = stream_read_tree (ib, data_in); } } @@ -2773,7 +2769,7 @@ ipa_write_node_info (struct output_block *ob, struct cgraph_node *node) encoder = ob->decl_state->cgraph_node_encoder; node_ref = lto_cgraph_encoder_encode (encoder, node); - lto_output_uleb128_stream (ob->main_stream, node_ref); + streamer_write_uhwi (ob, node_ref); bp = bitpack_create (ob->main_stream); gcc_assert (info->uses_analysis_done @@ -2782,13 +2778,12 @@ ipa_write_node_info (struct output_block *ob, struct cgraph_node *node) gcc_assert (!info->ipcp_orig_node); for (j = 0; j < ipa_get_param_count (info); j++) bp_pack_value (&bp, ipa_is_param_used (info, j), 1); - lto_output_bitpack (&bp); + streamer_write_bitpack (&bp); for (e = node->callees; e; e = e->next_callee) { struct ipa_edge_args *args = IPA_EDGE_REF (e); - lto_output_uleb128_stream (ob->main_stream, - ipa_get_cs_argument_count (args)); + streamer_write_uhwi (ob, ipa_get_cs_argument_count (args)); for (j = 0; j < ipa_get_cs_argument_count (args); j++) ipa_write_jump_function (ob, ipa_get_ith_jump_func (args, j)); } @@ -2796,8 +2791,7 @@ ipa_write_node_info (struct output_block *ob, struct cgraph_node *node) { struct ipa_edge_args *args = IPA_EDGE_REF (e); - lto_output_uleb128_stream (ob->main_stream, - ipa_get_cs_argument_count (args)); + streamer_write_uhwi (ob, ipa_get_cs_argument_count (args)); for (j = 0; j < ipa_get_cs_argument_count (args); j++) ipa_write_jump_function (ob, ipa_get_ith_jump_func (args, j)); ipa_write_indirect_edge_info (ob, e); @@ -2817,7 +2811,7 @@ ipa_read_node_info (struct lto_input_block *ib, struct cgraph_node *node, ipa_initialize_node_params (node); - bp = lto_input_bitpack (ib); + bp = streamer_read_bitpack (ib); if (ipa_get_param_count (info) != 0) info->uses_analysis_done = true; info->node_enqueued = false; @@ -2826,7 +2820,7 @@ ipa_read_node_info (struct lto_input_block *ib, struct cgraph_node *node, for (e = node->callees; e; e = e->next_callee) { struct ipa_edge_args *args = IPA_EDGE_REF (e); - int count = lto_input_uleb128 (ib); + int count = streamer_read_uhwi (ib); ipa_set_cs_argument_count (args, count); if (!count) @@ -2840,7 +2834,7 @@ ipa_read_node_info (struct lto_input_block *ib, struct cgraph_node *node, for (e = node->indirect_calls; e; e = e->next_callee) { struct ipa_edge_args *args = IPA_EDGE_REF (e); - int count = lto_input_uleb128 (ib); + int count = streamer_read_uhwi (ib); ipa_set_cs_argument_count (args, count); if (count) @@ -2877,7 +2871,7 @@ ipa_prop_write_jump_functions (cgraph_node_set set) count++; } - lto_output_uleb128_stream (ob->main_stream, count); + streamer_write_uhwi (ob, count); /* Process all of the functions. */ for (csi = csi_start (set); !csi_end_p (csi); csi_next (&csi)) @@ -2887,7 +2881,7 @@ ipa_prop_write_jump_functions (cgraph_node_set set) && IPA_NODE_REF (node) != NULL) ipa_write_node_info (ob, node); } - lto_output_1_stream (ob->main_stream, 0); + streamer_write_char_stream (ob->main_stream, 0); produce_asm (ob, NULL); destroy_output_block (ob); } @@ -2914,7 +2908,7 @@ ipa_prop_read_section (struct lto_file_decl_data *file_data, const char *data, data_in = lto_data_in_create (file_data, (const char *) data + string_offset, header->string_size, NULL); - count = lto_input_uleb128 (&ib_main); + count = streamer_read_uhwi (&ib_main); for (i = 0; i < count; i++) { @@ -2922,7 +2916,7 @@ ipa_prop_read_section (struct lto_file_decl_data *file_data, const char *data, struct cgraph_node *node; lto_cgraph_encoder_t encoder; - index = lto_input_uleb128 (&ib_main); + index = streamer_read_uhwi (&ib_main); encoder = file_data->cgraph_node_encoder; node = lto_cgraph_encoder_deref (encoder, index); gcc_assert (node->analyzed); |