+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
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,
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. */
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.
/* 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)