Commit 0d0bfe17 by Richard Guenther Committed by Richard Biener

gimple.c (free_gimple_type_tables): New function.

2009-10-08  Richard Guenther  <rguenther@suse.de>

	* gimple.c (free_gimple_type_tables): New function.
	* gimple.h (free_gimple_type_tables): Declare.

	lto/
	* lto.c (read_cgraph_and_symbols): Free the gimple type merging
	hash tables.

From-SVN: r152562
parent 90e1a349
2009-10-08 Richard Guenther <rguenther@suse.de>
* gimple.c (free_gimple_type_tables): New function.
* gimple.h (free_gimple_type_tables): Declare.
2009-10-07 Mark Heffernan <meheff@google.com>
* ipa-prop.c (ipa_print_node_params) Only print
......@@ -3899,8 +3899,8 @@ print_gimple_types_stats (void)
else
fprintf (stderr, "GIMPLE type table is empty\n");
if (gtc_visited)
fprintf (stderr, "GIMPLE type comparison table: size %ld, %ld elements, "
"%ld searches, %ld collisions (ratio: %f)\n",
fprintf (stderr, "GIMPLE type comparison table: size %ld, %ld "
"elements, %ld searches, %ld collisions (ratio: %f)\n",
(long) htab_size (gtc_visited),
(long) htab_elements (gtc_visited),
(long) gtc_visited->searches,
......@@ -3910,6 +3910,32 @@ print_gimple_types_stats (void)
fprintf (stderr, "GIMPLE type comparison table is empty\n");
}
/* Free the gimple type hashtables used for LTO type merging. */
void
free_gimple_type_tables (void)
{
/* Last chance to print stats for the tables. */
if (flag_lto_report)
print_gimple_types_stats ();
if (gimple_types)
{
htab_delete (gimple_types);
gimple_types = NULL;
}
if (type_hash_cache)
{
pointer_map_destroy (type_hash_cache);
type_hash_cache = NULL;
}
if (gtc_visited)
{
htab_delete (gtc_visited);
gtc_visited = NULL;
}
}
/* Return a type the same as TYPE except unsigned or
signed according to UNSIGNEDP. */
......
......@@ -919,6 +919,7 @@ extern void gimple_force_type_merge (tree, tree);
extern int gimple_types_compatible_p (tree, tree);
extern tree gimple_register_type (tree);
extern void print_gimple_types_stats (void);
extern void free_gimple_type_tables (void);
extern tree gimple_unsigned_type (tree);
extern tree gimple_signed_type (tree);
extern alias_set_type gimple_get_alias_set (tree);
......
2009-10-08 Richard Guenther <rguenther@suse.de>
* lto.c (read_cgraph_and_symbols): Free the gimple type merging
hash tables.
2009-10-07 Joseph Myers <joseph@codesourcery.com>
* lto.c: Only include <sys/mman.h> if HAVE_MMAP_FILE.
......
......@@ -1844,6 +1844,9 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
/* Fixup all decls and types. */
lto_fixup_decls (all_file_decl_data);
/* Free the type hash tables. */
free_gimple_type_tables ();
/* FIXME lto. This loop needs to be changed to use the pass manager to
call the ipa passes directly. */
if (!errorcount)
......
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