aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-09-04 11:25:41 -0700
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-04 18:25:41 +0000
commit0a25f1f5e2a425425b7d09e24a530bb6e0247393 (patch)
tree068cd2859713068d2e717951d385915d6b99a4df /gcc/toplev.c
parent482cbc74aacb9f764edb4d97722fb0df3c3fd73e (diff)
downloadgcc-0a25f1f5e2a425425b7d09e24a530bb6e0247393.zip
gcc-0a25f1f5e2a425425b7d09e24a530bb6e0247393.tar.gz
gcc-0a25f1f5e2a425425b7d09e24a530bb6e0247393.tar.bz2
Makefile.in (GGC, GGC_LIB): New.
* Makefile.in (GGC, GGC_LIB): New. (HOST_RTL): Include ggc-none.o. (ggc-simple.o): New target. (ggc-none.o): Likewise. * tree.h (tree_common): Add gc_mark. * rtl.h (struct rtx_def): Steal a bit from code to make gc_mark. (struct rtvec_def): Add gc_mark. * emit-rtl.c (global_rtl): Update static initializers to contain enough initializers. * ggc.h, ggc-none.c, ggc-simple.c: New files. * toplev.c (gc_time): New variable. (all_time): New variable. (compile_file): Print gc time. (print_time): Calculate percentage of the whole. From-SVN: r29106
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 3534da7..266c64c 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA. */
#include "expr.h"
#include "basic-block.h"
#include "intl.h"
+#include "ggc.h"
#ifdef DWARF_DEBUGGING_INFO
#include "dwarfout.h"
@@ -1350,6 +1351,8 @@ int stack_reg_time;
int final_time;
int symout_time;
int dump_time;
+int gc_time;
+int all_time;
/* Return time used so far, in microseconds. */
@@ -1429,8 +1432,9 @@ print_time (str, total)
int total;
{
fprintf (stderr,
- "time in %s: %d.%06d\n",
- str, total / 1000000, total % 1000000);
+ "time in %s: %d.%06d (%.0f%%)\n",
+ str, total / 1000000, total % 1000000,
+ (double)total / (double)all_time * 100.0);
}
/* Count an error or warning. Return 1 if the message should be printed. */
@@ -3446,9 +3450,11 @@ compile_file (name)
if (! quiet_flag)
{
+ all_time = get_run_time ();
+
fprintf (stderr,"\n");
- print_time ("parse", parse_time);
+ print_time ("parse", parse_time);
print_time ("integration", integration_time);
print_time ("jump", jump_time);
print_time ("cse", cse_time);
@@ -3473,6 +3479,7 @@ compile_file (name)
print_time ("varconst", varconst_time);
print_time ("symout", symout_time);
print_time ("dump", dump_time);
+ print_time ("gc", gc_time);
}
}
@@ -3772,7 +3779,7 @@ rest_of_compilation (decl)
/* See if we have allocated stack slots that are not directly addressable.
If so, scan all the insns and create explicit address computation
for all references to such slots. */
-/* fixup_stack_slots (); */
+ /* fixup_stack_slots (); */
/* Find all the EH handlers. */
find_exception_handler_labels ();