aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2011-04-29 12:27:26 +0000
committerMichael Matz <matz@gcc.gnu.org>2011-04-29 12:27:26 +0000
commitb823cdfe763c9784a8e9f7b86b8e91614c29de6c (patch)
treec61f3e7031b4f1e93cb11ce662f70e58fc9052aa /gcc/lto-streamer.c
parentfa5e5a764f6602df0d4b814c49d352f8907cf2e1 (diff)
downloadgcc-b823cdfe763c9784a8e9f7b86b8e91614c29de6c.zip
gcc-b823cdfe763c9784a8e9f7b86b8e91614c29de6c.tar.gz
gcc-b823cdfe763c9784a8e9f7b86b8e91614c29de6c.tar.bz2
lto-streamer.c (lto_streamer_cache_insert_1): Accept to override other trees that just builtins.
* 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). From-SVN: r173155
Diffstat (limited to 'gcc/lto-streamer.c')
-rw-r--r--gcc/lto-streamer.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c
index 74034b0..8092792 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;
}