Commit 83fd5d11 by Richard Biener Committed by Richard Biener

gimple.c (gimple_canonical_types, [...]): Move to lto/lto.c

2013-10-14  Richard Biener  <rguenther@suse.de>

	* gimple.c (gimple_canonical_types, canonical_type_hash_cache,
	iterative_hash_canonical_type, gimple_canonical_type_hash,
	gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
	gimple_register_canonical_type, print_gimple_types_stats,
	free_gimple_type_tables): Move to lto/lto.c
	(gt-gimple.h): Do not include.
	* gimple.h (gimple_register_canonical_type,
	print_gimple_types_stats, free_gimple_type_tables): Remove.
	* Makefile.in (GTFILES): Remove gimple.c.

	lto/
	* lto-lang.c (lto_init): Do not re-init canonical types here.
	(lto_register_canonical_types): Move to ...
	* lto.c (lto_register_canonical_types): ... here.
	(gimple_canonical_types, canonical_type_hash_cache,
	iterative_hash_canonical_type, gimple_canonical_type_hash,
	gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
	gimple_register_canonical_type): Add canonical type merging machinery
	moved from gimple.c.
	(read_cgraph_and_symbols): Init and free canonical type tables
	here.
	(print_lto_report_1): Report canonical type table stats here.

From-SVN: r203521
parent a6dbd0f7
2013-10-14 Richard Biener <rguenther@suse.de>
* gimple.c (gimple_canonical_types, canonical_type_hash_cache,
iterative_hash_canonical_type, gimple_canonical_type_hash,
gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
gimple_register_canonical_type, print_gimple_types_stats,
free_gimple_type_tables): Move to lto/lto.c
(gt-gimple.h): Do not include.
* gimple.h (gimple_register_canonical_type,
print_gimple_types_stats, free_gimple_type_tables): Remove.
* Makefile.in (GTFILES): Remove gimple.c.
2013-10-14 Travis Snoozy <quandary@remstate.com> 2013-10-14 Travis Snoozy <quandary@remstate.com>
PR target/58716 PR target/58716
......
...@@ -2240,7 +2240,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ ...@@ -2240,7 +2240,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/reg-stack.c $(srcdir)/cfgrtl.c \ $(srcdir)/reg-stack.c $(srcdir)/cfgrtl.c \
$(srcdir)/sdbout.c $(srcdir)/stor-layout.c \ $(srcdir)/sdbout.c $(srcdir)/stor-layout.c \
$(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \ $(srcdir)/stringpool.c $(srcdir)/tree.c $(srcdir)/varasm.c \
$(srcdir)/gimple.h $(srcdir)/gimple.c \ $(srcdir)/gimple.h \
$(srcdir)/tree-mudflap.c $(srcdir)/gimple-ssa.h \ $(srcdir)/tree-mudflap.c $(srcdir)/gimple-ssa.h \
$(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \ $(srcdir)/tree-ssanames.c $(srcdir)/tree-eh.c $(srcdir)/tree-ssa-address.c \
$(srcdir)/tree-cfg.c \ $(srcdir)/tree-cfg.c \
......
...@@ -891,9 +891,6 @@ extern bool is_gimple_builtin_call (gimple stmt); ...@@ -891,9 +891,6 @@ extern bool is_gimple_builtin_call (gimple stmt);
extern void recalculate_side_effects (tree); extern void recalculate_side_effects (tree);
extern bool gimple_compare_field_offset (tree, tree); extern bool gimple_compare_field_offset (tree, tree);
extern tree gimple_register_canonical_type (tree);
extern void print_gimple_types_stats (const char *);
extern void free_gimple_type_tables (void);
extern tree gimple_unsigned_type (tree); extern tree gimple_unsigned_type (tree);
extern tree gimple_signed_type (tree); extern tree gimple_signed_type (tree);
extern alias_set_type gimple_get_alias_set (tree); extern alias_set_type gimple_get_alias_set (tree);
......
2013-10-14 Richard Biener <rguenther@suse.de>
* lto-lang.c (lto_init): Do not re-init canonical types here.
(lto_register_canonical_types): Move to ...
* lto.c (lto_register_canonical_types): ... here.
(gimple_canonical_types, canonical_type_hash_cache,
iterative_hash_canonical_type, gimple_canonical_type_hash,
gimple_canonical_types_compatible_p, gimple_canonical_type_eq,
gimple_register_canonical_type): Add canonical type merging machinery
moved from gimple.c.
(read_cgraph_and_symbols): Init and free canonical type tables
here.
(print_lto_report_1): Report canonical type table stats here.
2013-10-11 Jakub Jelinek <jakub@redhat.com> 2013-10-11 Jakub Jelinek <jakub@redhat.com>
* lto-lang.c (DEF_FUNCTION_TYPE_8): Define. * lto-lang.c (DEF_FUNCTION_TYPE_8): Define.
......
...@@ -1134,31 +1134,11 @@ lto_build_c_type_nodes (void) ...@@ -1134,31 +1134,11 @@ lto_build_c_type_nodes (void)
pid_type_node = integer_type_node; pid_type_node = integer_type_node;
} }
/* Re-compute TYPE_CANONICAL for NODE and related types. */
static void
lto_register_canonical_types (tree node)
{
if (!node
|| !TYPE_P (node))
return;
TYPE_CANONICAL (node) = NULL_TREE;
TYPE_CANONICAL (node) = gimple_register_canonical_type (node);
if (POINTER_TYPE_P (node)
|| TREE_CODE (node) == COMPLEX_TYPE
|| TREE_CODE (node) == ARRAY_TYPE)
lto_register_canonical_types (TREE_TYPE (node));
}
/* Perform LTO-specific initialization. */ /* Perform LTO-specific initialization. */
static bool static bool
lto_init (void) lto_init (void)
{ {
unsigned i;
/* We need to generate LTO if running in WPA mode. */ /* We need to generate LTO if running in WPA mode. */
flag_generate_lto = flag_wpa; flag_generate_lto = flag_wpa;
...@@ -1226,17 +1206,6 @@ lto_init (void) ...@@ -1226,17 +1206,6 @@ lto_init (void)
NAME_TYPE (boolean_type_node, "bool"); NAME_TYPE (boolean_type_node, "bool");
#undef NAME_TYPE #undef NAME_TYPE
/* Register the common node types with the canonical type machinery so
we properly share alias-sets across languages and TUs. Do not
expose the common nodes as type merge target - those that should be
are already exposed so by pre-loading the LTO streamer caches. */
for (i = 0; i < itk_none; ++i)
lto_register_canonical_types (integer_types[i]);
/* The sizetypes are not used to access data so we do not need to
do anything about them. */
for (i = 0; i < TI_MAX; ++i)
lto_register_canonical_types (global_trees[i]);
/* Initialize LTO-specific data structures. */ /* Initialize LTO-specific data structures. */
vec_alloc (lto_global_var_decls, 256); vec_alloc (lto_global_var_decls, 256);
in_lto_p = true; in_lto_p = true;
......
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