Commit b823cdfe by Michael Matz Committed by Michael Matz

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
parent fa5e5a76
2011-04-29 Michael Matz <matz@suse.de>
* 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.
2011-04-29 Richard Guenther <rguenther@suse.de> 2011-04-29 Richard Guenther <rguenther@suse.de>
* tree-nested.c (get_trampoline_type): Use size_int. * tree-nested.c (get_trampoline_type): Use size_int.
......
...@@ -383,19 +383,8 @@ lto_streamer_cache_insert_1 (struct lto_streamer_cache_d *cache, ...@@ -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 /* If the caller wants to insert T at a specific slot
location, and ENTRY->TO does not match *IX_P, add T to location, and ENTRY->TO does not match *IX_P, add T to
the requested location slot. This situation arises when the requested location slot. */
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));
ix = *ix_p; ix = *ix_p;
lto_streamer_cache_add_to_node_array (cache, ix, t); 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, ...@@ -513,6 +502,8 @@ lto_record_common_node (tree *nodep, VEC(tree, heap) **common_nodes,
TYPE_CANONICAL (node) = NULL_TREE; TYPE_CANONICAL (node) = NULL_TREE;
node = gimple_register_type (node); node = gimple_register_type (node);
TYPE_CANONICAL (node) = gimple_register_canonical_type (node); TYPE_CANONICAL (node) = gimple_register_canonical_type (node);
if (in_lto_p)
TYPE_CANONICAL (*nodep) = TYPE_CANONICAL (node);
*nodep = node; *nodep = node;
} }
......
2011-04-29 Michael Matz <matz@suse.de>
* 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).
2011-04-16 Eric Botcazou <ebotcazou@adacore.com> 2011-04-16 Eric Botcazou <ebotcazou@adacore.com>
* lto.c (lto_balanced_map): Fix typos in head comment. * lto.c (lto_balanced_map): Fix typos in head comment.
......
...@@ -81,7 +81,7 @@ lto/lto-lang.o: lto/lto-lang.c $(CONFIG_H) coretypes.h debug.h \ ...@@ -81,7 +81,7 @@ lto/lto-lang.o: lto/lto-lang.c $(CONFIG_H) coretypes.h debug.h \
$(TARGET_H) $(LTO_H) $(GIMPLE_H) gtype-lto.h gt-lto-lto-lang.h \ $(TARGET_H) $(LTO_H) $(GIMPLE_H) gtype-lto.h gt-lto-lto-lang.h \
$(EXPR_H) $(LTO_STREAMER_H) $(EXPR_H) $(LTO_STREAMER_H)
lto/lto.o: lto/lto.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(OPTS_H) \ lto/lto.o: lto/lto.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(OPTS_H) \
toplev.h $(TREE_H) $(DIAGNOSTIC_CORE_H) $(TM_H) \ toplev.h $(TREE_H) $(TREE_FLOW_H) $(DIAGNOSTIC_CORE_H) $(TM_H) \
$(CGRAPH_H) $(GGC_H) tree-ssa-operands.h $(TREE_PASS_H) \ $(CGRAPH_H) $(GGC_H) tree-ssa-operands.h $(TREE_PASS_H) \
langhooks.h $(VEC_H) $(BITMAP_H) pointer-set.h $(IPA_PROP_H) \ langhooks.h $(VEC_H) $(BITMAP_H) pointer-set.h $(IPA_PROP_H) \
$(COMMON_H) debug.h $(TIMEVAR_H) $(GIMPLE_H) $(LTO_H) $(LTO_TREE_H) \ $(COMMON_H) debug.h $(TIMEVAR_H) $(GIMPLE_H) $(LTO_H) $(LTO_TREE_H) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment