Commit b9bfacf0 by Richard Kenner Committed by Richard Kenner

Makefile.in (ggc-page.o): Now includes toplev.h.

	* Makefile.in (ggc-page.o): Now includes toplev.h.
	* ggc-page.c (toplev.h): Now included.
	(gc_time): Remove declaration.
	(ggc_collect): TIME now long.
	* toplev.c (parse_time, varasm_time, gc_time): Still global; all
	others static.
	* toplev.h (gc_time, parse_time, gc_time): New declarations.
	* cp/decl2.c (parse_time, varconst_time): Delete declarations.
	(finish_file): Delete LINENO declaration.
	START_TIME and THIS_TIME now long.

From-SVN: r33169
parent 77a02dba
Sat Apr 15 10:59:19 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> Sat Apr 15 10:59:19 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Makefile.in (ggc-page.o): Now includes toplev.h.
* ggc-page.c (toplev.h): Now included.
(gc_time): Remove declaration.
(ggc_collect): TIME now long.
* toplev.c (parse_time, varasm_time, gc_time): Still global; all
others static.
* toplev.h (gc_time, parse_time, gc_time): New declarations.
* toplev.c: Make *_time variable long to reduce chance of overflow. * toplev.c: Make *_time variable long to reduce chance of overflow.
(TIMEVAR): Likewise for `otime'. (TIMEVAR): Likewise for `otime'.
(print_time): Arg is now long; compute percentage in FP and round. (print_time): Arg is now long; compute percentage in FP and round.
......
...@@ -1475,7 +1475,7 @@ ggc-common.o: ggc-common.c $(CONFIG_H) $(RTL_H) $(TREE_H) \ ...@@ -1475,7 +1475,7 @@ ggc-common.o: ggc-common.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
ggc-simple.o: ggc-simple.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ ggc-simple.o: ggc-simple.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \
$(GGC_H) varray.h $(GGC_H) varray.h
ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h \ ggc-page.o: ggc-page.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h toplev.h \
$(GGC_H) varray.h $(GGC_H) varray.h
ggc-none.o: ggc-none.c $(CONFIG_H) $(RTL_H) $(GGC_H) ggc-none.o: ggc-none.c $(CONFIG_H) $(RTL_H) $(GGC_H)
......
Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* decl2.c (parse_time, varconst_time): Delete declarations.
(finish_file): Delete LINENO declaration.
START_TIME and THIS_TIME now long.
2000-04-13 Nathan Sidwell <nathan@codesourcery.com> 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
* class.c (build_base_field): Reformat comment. * class.c (build_base_field): Reformat comment.
......
...@@ -2760,8 +2760,6 @@ build_cleanup (decl) ...@@ -2760,8 +2760,6 @@ build_cleanup (decl)
return temp; return temp;
} }
extern int parse_time, varconst_time;
static tree static tree
get_sentry (base) get_sentry (base)
tree base; tree base;
...@@ -2771,6 +2769,7 @@ get_sentry (base) ...@@ -2771,6 +2769,7 @@ get_sentry (base)
__snfoo. Since base is already an assembler name, sname should __snfoo. Since base is already an assembler name, sname should
be globally unique */ be globally unique */
tree sentry = IDENTIFIER_GLOBAL_VALUE (sname); tree sentry = IDENTIFIER_GLOBAL_VALUE (sname);
if (! sentry) if (! sentry)
{ {
sentry = build_decl (VAR_DECL, sname, integer_type_node); sentry = build_decl (VAR_DECL, sname, integer_type_node);
...@@ -3413,8 +3412,7 @@ generate_ctor_and_dtor_functions_for_priority (n, data) ...@@ -3413,8 +3412,7 @@ generate_ctor_and_dtor_functions_for_priority (n, data)
void void
finish_file () finish_file ()
{ {
extern int lineno; long start_time, this_time;
int start_time, this_time;
tree vars; tree vars;
int reconsider; int reconsider;
size_t i; size_t i;
......
/* "Bag-of-pages" garbage collector for the GNU compiler. /* "Bag-of-pages" garbage collector for the GNU compiler.
Copyright (C) 1999, 2000 Free Software Foundation, Inc. Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
GNU CC is distributed in the hope that it will be useful, GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "tree.h" #include "tree.h"
#include "rtl.h" #include "rtl.h"
#include "tm_p.h" #include "tm_p.h"
#include "toplev.h"
#include "varray.h" #include "varray.h"
#include "flags.h" #include "flags.h"
#include "ggc.h" #include "ggc.h"
...@@ -97,9 +98,6 @@ ...@@ -97,9 +98,6 @@
#define HOST_BITS_PER_PTR HOST_BITS_PER_LONG #define HOST_BITS_PER_PTR HOST_BITS_PER_LONG
#endif #endif
/* Timing information for collect execution goes into here. */
extern int gc_time;
/* The "" allocated string. */ /* The "" allocated string. */
char *empty_string; char *empty_string;
...@@ -1103,7 +1101,7 @@ poison_pages () ...@@ -1103,7 +1101,7 @@ poison_pages ()
void void
ggc_collect () ggc_collect ()
{ {
int time; long time;
/* Avoid frequent unnecessary work by skipping collection if the /* Avoid frequent unnecessary work by skipping collection if the
total allocations haven't expanded much since the last total allocations haven't expanded much since the last
...@@ -1115,7 +1113,7 @@ ggc_collect () ...@@ -1115,7 +1113,7 @@ ggc_collect ()
time = get_run_time (); time = get_run_time ();
if (!quiet_flag) if (!quiet_flag)
fprintf (stderr, " {GC %luk -> ", (unsigned long)G.allocated / 1024); fprintf (stderr, " {GC %luk -> ", (unsigned long) G.allocated / 1024);
/* Zero the total allocated bytes. We'll reaccumulate this while /* Zero the total allocated bytes. We'll reaccumulate this while
marking. */ marking. */
......
...@@ -1401,38 +1401,40 @@ read_integral_parameter (p, pname, defval) ...@@ -1401,38 +1401,40 @@ read_integral_parameter (p, pname, defval)
} }
/* Time accumulators, to count the total time spent in various passes. */ /* Time accumulators, to count the total time spent in various passes.
The first three are used in other files; the latter two only here. */
long gc_time;
long parse_time; long parse_time;
long varconst_time; long varconst_time;
long integration_time;
long jump_time; static long integration_time;
long cse_time; static long jump_time;
long gcse_time; static long cse_time;
long loop_time; static long gcse_time;
long cse2_time; static long loop_time;
long branch_prob_time; static long cse2_time;
long flow_time; static long branch_prob_time;
long combine_time; static long flow_time;
long regmove_time; static long combine_time;
long sched_time; static long regmove_time;
long local_alloc_time; static long sched_time;
long global_alloc_time; static long local_alloc_time;
long flow2_time; static long global_alloc_time;
long peephole2_time; static long flow2_time;
long sched2_time; static long peephole2_time;
long dbr_sched_time; static long sched2_time;
long reorder_blocks_time; static long dbr_sched_time;
long rename_registers_time; static long reorder_blocks_time;
long shorten_branch_time; static long rename_registers_time;
long stack_reg_time; static long shorten_branch_time;
long to_ssa_time; static long stack_reg_time;
long from_ssa_time; static long to_ssa_time;
long final_time; static long from_ssa_time;
long symout_time; static long final_time;
long dump_time; static long symout_time;
long gc_time; static long dump_time;
long all_time; static long all_time;
/* Return time used so far, in microseconds. */ /* Return time used so far, in microseconds. */
......
...@@ -26,6 +26,10 @@ union tree_node; ...@@ -26,6 +26,10 @@ union tree_node;
struct rtx_def; struct rtx_def;
#endif #endif
extern long gc_time;
extern long parse_time;
extern long varconst_time;
extern int read_integral_parameter PARAMS ((const char *, const char *, extern int read_integral_parameter PARAMS ((const char *, const char *,
const int)); const int));
extern int count_error PARAMS ((int)); extern int count_error PARAMS ((int));
......
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