diff options
author | Diego Novillo <dnovillo@google.com> | 2011-08-11 08:02:34 -0400 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2011-08-11 08:02:34 -0400 |
commit | b9393656725809539d9a31c268df6230ed8d6691 (patch) | |
tree | c67c6c54079ea71a807b5373467385939adc98f6 /gcc/ipa-prop.c | |
parent | cf596bc73f4158c9b6a999e5a921b0616e2e1d6c (diff) | |
download | gcc-b9393656725809539d9a31c268df6230ed8d6691.zip gcc-b9393656725809539d9a31c268df6230ed8d6691.tar.gz gcc-b9393656725809539d9a31c268df6230ed8d6691.tar.bz2 |
tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call stream_write_tree instead of output_record_start.
* tree-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers):
Call stream_write_tree instead of output_record_start.
(lto_output_ts_binfo_tree_pointers): Likewise.
* streamer-hooks.h (stream_write_tree): Move from tree-streamer.h.
Convert it to a macro.
(stream_read_tree): Likewise.
* lto-streamer.h (lto_stream_as_builtin_p): Move ...
* tree-streamer.h (lto_stream_as_builtin_p): ... here.
* lto-streamer-in.c (lto_read_tree): Call lto_streamer_cache_append
and tree_read_bitfields.
* lto-streamer-out.c (lto_is_streamable): Move from lto-streamer.c
(lto_write_tree): Call it.
* lto-streamer.c (lto_is_streamable): Move to lto-streamer-out.c
* streamer-hooks.h (struct streamer_hooks): Remove fields
name, is_streamable and alloc_tree. Update all users.
* tree-streamer-in.c (tree_read_bitfields): Factor out of ...
(lto_materialize_tree): ... here.
Handle CALL_EXPR codes.
Remove call to lto_streamer_cache_append.
* tree-streamer-out.c (lto_output_tree_header): Handle
CALL_EXPR nodes.
* tree-streamer.h (tree_read_bitfields): Declare.
* Makefile.in (TREE_STREAMER_H): Add STREAMER_HOOKS_H.
(gimple-streamer-in.o): Add dependency on TREE_STREAMER_H.
* tree-streamer.h (stream_read_tree): New. Replace all calls
to lto_input_tree with it.
(stream_write_tree): New. Replace all calls to lto_output_tree,
lto_output_tree_ref and lto_output_tree_or_ref with it.
* lto-streamer-in.c (lto_read_tree): Inline code from
lto_streamer_read_tree.
(lto_input_tree): Move from tree-streamer-in.c.
* lto-streamer-out.c (lto_output_tree_ref): Make static.
Remove handling of NULL values for EXPR.
Do not handle EXPRs that are not indexable.
(lto_write_tree): Move from tree-streamer-out.c.
Inline lto_streamer_write_tree.
(lto_output_tree): Move from tree-streamer-out.c.
If REF_P is true and EXPR is indexable, call lto_output_tree_ref.
* lto-streamer.c (lto_record_common_node): Move to tree-streamer.c.
(lto_preload_common_nodes): Likewise.
Remove assertions and adjustments for nodes
main_identifier_node, ptrdiff_type_node and fileptr_type_node.
(lto_streamer_hooks_init): Set streamer_hooks.write_tree to
lto_output_tree and streamer_hooks.read_tree to
lto_input_tree.
* lto-streamer.h (lto_input_tree): Declare.
(lto_output_tree_ref): Remove.
* streamer-hooks.h (struct streamer_hooks): Remove fields
preload_common_nodes, indexable_with_decls_p,
pack_value_fields, unpack_value_fields, output_tree_header and
has_unique_integer_csts_p.
Update all users.
* tree-streamer-in.c (lto_materialize_tree): Make extern.
(lto_input_tree_pointers): Likewise.
(lto_read_tree): Move to lto-streamer-in.c.
(lto_input_integer_cst): Make extern.
(lto_get_pickled_tree): Likewise.
(lto_get_builtin_tree): Likewise.
(lto_input_tree): Move to lto-streamer-in.c.
* tree-streamer-out.c (pack_value_fields): Make extern.
(lto_output_tree_or_ref): Remove. Replace all callers with
calls to stream_write_tree.
(lto_output_builtin_tree): Make extern.
(lto_streamer_write_tree): Inline into lto_write_tree.
(lto_output_tree_pointers): Make extern.
(lto_output_tree_header): Likewise.
(lto_output_integer_cst): Likewise.
(lto_write_tree): Move to lto-streamer-out.c.
(lto_output_tree): Likewise.
* tree-streamer.c (lto_record_common_node): Move from
lto-streamer.c
(preload_common_nodes): Likewise.
(lto_streamer_cache_create): Call it.
* tree-streamer.h: Include streamer-hooks.h.
(stream_write_tree): New.
(stream_read_tree): New.
(lto_input_tree): Remove.
(lto_materialize_tree): Declare.
(lto_input_tree_pointers): Declare.
(lto_get_pickled_tree): Declare.
(lto_get_builtin_tree): Declare.
(lto_input_integer_cst): Declare.
(lto_output_tree_header): Declare.
(pack_value_fields): Declare.
(lto_output_tree_pointers): Declare.
(lto_output_integer_cst): Declare.
(lto_output_builtin_tree): Declare.
From-SVN: r177661
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 7f9f547..0997cf5 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -2652,13 +2652,13 @@ ipa_write_jump_function (struct output_block *ob, case IPA_JF_UNKNOWN: break; case IPA_JF_KNOWN_TYPE: - lto_output_tree (ob, jump_func->value.base_binfo, true); + stream_write_tree (ob, jump_func->value.base_binfo, true); break; case IPA_JF_CONST: - lto_output_tree (ob, jump_func->value.constant, true); + stream_write_tree (ob, jump_func->value.constant, true); break; case IPA_JF_PASS_THROUGH: - lto_output_tree (ob, jump_func->value.pass_through.operand, true); + 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, @@ -2667,13 +2667,13 @@ ipa_write_jump_function (struct output_block *ob, case IPA_JF_ANCESTOR: lto_output_uleb128_stream (ob->main_stream, jump_func->value.ancestor.offset); - lto_output_tree (ob, jump_func->value.ancestor.type, true); + stream_write_tree (ob, jump_func->value.ancestor.type, true); lto_output_uleb128_stream (ob->main_stream, jump_func->value.ancestor.formal_id); break; case IPA_JF_CONST_MEMBER_PTR: - lto_output_tree (ob, jump_func->value.member_cst.pfn, true); - lto_output_tree (ob, jump_func->value.member_cst.delta, false); + stream_write_tree (ob, jump_func->value.member_cst.pfn, true); + stream_write_tree (ob, jump_func->value.member_cst.delta, false); break; } } @@ -2692,24 +2692,24 @@ ipa_read_jump_function (struct lto_input_block *ib, case IPA_JF_UNKNOWN: break; case IPA_JF_KNOWN_TYPE: - jump_func->value.base_binfo = lto_input_tree (ib, data_in); + jump_func->value.base_binfo = stream_read_tree (ib, data_in); break; case IPA_JF_CONST: - jump_func->value.constant = lto_input_tree (ib, data_in); + jump_func->value.constant = stream_read_tree (ib, data_in); break; case IPA_JF_PASS_THROUGH: - jump_func->value.pass_through.operand = lto_input_tree (ib, data_in); + 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); break; case IPA_JF_ANCESTOR: jump_func->value.ancestor.offset = lto_input_uleb128 (ib); - jump_func->value.ancestor.type = lto_input_tree (ib, data_in); + jump_func->value.ancestor.type = stream_read_tree (ib, data_in); jump_func->value.ancestor.formal_id = lto_input_uleb128 (ib); break; case IPA_JF_CONST_MEMBER_PTR: - jump_func->value.member_cst.pfn = lto_input_tree (ib, data_in); - jump_func->value.member_cst.delta = lto_input_tree (ib, data_in); + jump_func->value.member_cst.pfn = stream_read_tree (ib, data_in); + jump_func->value.member_cst.delta = stream_read_tree (ib, data_in); break; } } @@ -2733,7 +2733,7 @@ ipa_write_indirect_edge_info (struct output_block *ob, if (ii->polymorphic) { lto_output_sleb128_stream (ob->main_stream, ii->otr_token); - lto_output_tree (ob, ii->otr_type, true); + stream_write_tree (ob, ii->otr_type, true); } } @@ -2755,7 +2755,7 @@ ipa_read_indirect_edge_info (struct lto_input_block *ib, if (ii->polymorphic) { ii->otr_token = (HOST_WIDE_INT) lto_input_sleb128 (ib); - ii->otr_type = lto_input_tree (ib, data_in); + ii->otr_type = stream_read_tree (ib, data_in); } } |