diff options
author | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-29 12:27:26 +0000 |
---|---|---|
committer | matz <matz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-04-29 12:27:26 +0000 |
commit | d534cab00feb1d9fff39265c960d143d31ee0635 (patch) | |
tree | c61f3e7031b4f1e93cb11ce662f70e58fc9052aa /gcc/lto-streamer.c | |
parent | 04df77d78cfdabb545c1fc602001f95ae66563df (diff) | |
download | gcc-d534cab00feb1d9fff39265c960d143d31ee0635.tar.gz |
* lto-streamer.c (lto_streamer_cache_insert_1): Accept to override
other trees that just builtins.
(lto_record_common_node): Don't leave NULL TYPE_CANONICAL.
lto/
* lto.c (toplevel): Include tree-flow.h.
(lto_read_in_decl_state): Don't merge types here.
(tree_with_vars): New static hash table.
(remember_with_vars): New static functions.
(LTO_FIXUP_TYPE): New macro.
(lto_ft_common, lto_ft_decl_minimal, lto_ft_decl_common,
lto_ft_decl_with_vis, lto_ft_decl_non_common, lto_ft_function,
lto_ft_field_decl, lto_ft_type, lto_ft_binfo, lto_ft_constructor,
lto_ft_expr, lto_fixup_types, uniquify_nodes): New static functions.
(lto_read_decls): Uniquify while reading in trees.
(lto_fixup_data_t, LTO_FIXUP_SUBTREE,
LTO_REGISTER_TYPE_AND_FIXUP_SUBTREE, no_fixup_p, lto_fixup_common,
lto_fixup_decl_minimal, lto_fixup_decl_common, lto_fixup_decl_with_vis,
lto_fixup_decl_non_common, lto_fixup_function, lto_fixup_field_decl,
lto_fixup_type, lto_fixup_binfo, lto_fixup_constructor,
lto_fixup_tree): Remove.
(lto_fixup_state): Remove data argument. Use
lto_symtab_prevailing_decl.
(LTO_SET_PREVAIL, LTO_NO_PREVAIL): New macros.
(lto_fixup_prevailing_decls): New function.
(lto_fixup_state_aux): Argument aux is unused.
(lto_fixup_decls): Don't allocate pointer sets, don't use
lto_fixup_tree, use lto_fixup_prevailing_decls.
(read_cgraph_and_symbols): Allocate and remove tree_with_vars.
* Make-lang.in (lto/lto.o): Depend on $(TREE_FLOW_H).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer.c')
-rw-r--r-- | gcc/lto-streamer.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c index 74034b07485..80927927dcc 100644 --- a/gcc/lto-streamer.c +++ b/gcc/lto-streamer.c @@ -383,19 +383,8 @@ lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache, { /* If the caller wants to insert T at a specific slot location, and ENTRY->TO does not match *IX_P, add T to - the requested location slot. This situation arises when - streaming builtin functions. - - For instance, on the writer side we could have two - FUNCTION_DECLS T1 and T2 that are represented by the same - builtin function. The reader will only instantiate the - canonical builtin, but since T1 and T2 had been - originally stored in different cache slots (S1 and S2), - the reader must be able to find the canonical builtin - function at slots S1 and S2. */ - gcc_assert (lto_stream_as_builtin_p (t)); + the requested location slot. */ ix = *ix_p; - lto_streamer_cache_add_to_node_array (cache, ix, t); } @@ -513,6 +502,8 @@ lto_record_common_node (tree *nodep, VEC(tree, heap) **common_nodes, TYPE_CANONICAL (node) = NULL_TREE; node = gimple_register_type (node); TYPE_CANONICAL (node) = gimple_register_canonical_type (node); + if (in_lto_p) + TYPE_CANONICAL (*nodep) = TYPE_CANONICAL (node); *nodep = node; } |