summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-23 14:30:36 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-23 14:30:36 +0000
commit51949610692cda038b73f2605ca30369c80e11e7 (patch)
tree7448acc1c5f3340010e52d07355ec0e394271f55 /gcc/toplev.c
parent08dd25f69b1c4ec117d01822c86f6eeb57793991 (diff)
downloadgcc-51949610692cda038b73f2605ca30369c80e11e7.tar.gz
* toplev.c (dump_memory_report): Break out from...
(finalize): Here. * toplev.h (dump_memory_report): Declare. (cmp_statistic): Rename to ... (final_cmp_statistic): ... this one (cmp_statistic): New. (dump_ggc_loc_staitsitcs): New FINAL parpameter. * common.opt (-fpre-ipa-mem-report, -fpost-ipa-mem-report): Declare. * varray.c (dump_varray_staitiscs): Do not segfault when no varray was allocated so far. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index d83da13b4a5..bcefdc091f1 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2012,6 +2012,19 @@ lang_dependent_init (const char *name)
return 1;
}
+void
+dump_memory_report (bool final)
+{
+ ggc_print_statistics ();
+ stringpool_statistics ();
+ dump_tree_statistics ();
+ dump_rtx_statistics ();
+ dump_varray_statistics ();
+ dump_alloc_pool_statistics ();
+ dump_bitmap_statistics ();
+ dump_ggc_loc_statistics (final);
+}
+
/* Clean up: close opened files, etc. */
static void
@@ -2040,16 +2053,7 @@ finalize (void)
finish_optimization_passes ();
if (mem_report)
- {
- ggc_print_statistics ();
- stringpool_statistics ();
- dump_tree_statistics ();
- dump_rtx_statistics ();
- dump_varray_statistics ();
- dump_alloc_pool_statistics ();
- dump_bitmap_statistics ();
- dump_ggc_loc_statistics ();
- }
+ dump_memory_report (true);
/* Free up memory for the benefit of leak detectors. */
free_reg_info ();