diff options
author | Alex Samuel <samuel@codesourcery.com> | 2000-04-28 00:59:40 +0000 |
---|---|---|
committer | Alex Samuel <samuel@gcc.gnu.org> | 2000-04-28 00:59:40 +0000 |
commit | 2a9a326b172ca61ab8e1c4f60e81fb1df20364a1 (patch) | |
tree | 721fcd61f706b846a8cfad4302cec9e16abe799a /gcc/cp | |
parent | e815887f4d7e3aaa8e68584729c18c9b3c5fef05 (diff) | |
download | gcc-2a9a326b172ca61ab8e1c4f60e81fb1df20364a1.zip gcc-2a9a326b172ca61ab8e1c4f60e81fb1df20364a1.tar.gz gcc-2a9a326b172ca61ab8e1c4f60e81fb1df20364a1.tar.bz2 |
Makefile.in (OBJS): Add timevar.o.
hangeLog:
* Makefile.in (OBJS): Add timevar.o.
(toplev.o): Depend on timevar.h.
(ggc-simple.o): Likewise.
(ggc-page.o): Likewise.
(timevar.o): New rule.
(timevar.h): New rule.
* timevar.h: New file.
* timevar.c: Likewise.
* timevar.def: Likewise.
* toplev.h (gc_time, parse_time, varconst_time): Remove.
* toplev.c: Use timevar_push and timevar_pop instead of TIMEVAR
throughout.
(TIMEVAR): Remove macro.
(gc_time, parse_time, varconst_time, integration_time, jump_time,
cse_time, gcse_time, loop_time, cse2_time, branch_prob_time,
flow_time, combine_time, regmove_time, sched_time,
local_alloc_time, global_alloc_time, flow2_time, peephole2_time,
sched2_time, dbr_sched_time, reorder_blocks_time,
rename_registers_time, shorten_branch_time, stack_reg_time,
to_ssa_time, from_ssa_time, final_time, symout_time, dump_time,
all_time): Remove.
(compile_file): Don't initialize time variables. Call
init_timevar and start TV_TOTAL timer. Call timevar_print instead
of many calls to print_time.
(rest_of_compilation): Add timing for reload_cse_regs.
(get_run_time): Removed to timevar.c.
(print_time): Likewise.
(get_run_time): Implement using TV_TOTAL time variable.
(print_time): Get total run time from get_run_time.
* ggc-page.c (ggc_collect): Push and pop TV_GC instead of
computing elapsed time explicitly.
* ggc-simple.c (ggc_collect): Likewise.
(gc_time): Remove declaration.
cp/ChangeLog:
* lex.c (my_get_run_time): Remove.
(init_filename_times): Use get_run_time instead of my_get_run_time.
(check_newline): Likewise.
(dump_time_statistics): Likewise.
* decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
of computing elapsed time explicitly.
From-SVN: r33496
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 8 | ||||
-rw-r--r-- | gcc/cp/lex.c | 19 |
3 files changed, 16 insertions, 20 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f835725..fdad422 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2000-04-27 Alex Samuel <samuel@codesourcery.com> + + * lex.c (my_get_run_time): Remove. + (init_filename_times): Use get_run_time instead of my_get_run_time. + (check_newline): Likewise. + (dump_time_statistics): Likewise. + * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead + of computing elapsed time explicitly. + 2000-04-26 Mark Mitchell <mark@codesourcery.com> * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index dd89057..99473a8 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -44,6 +44,7 @@ Boston, MA 02111-1307, USA. */ #include "dwarf2out.h" #include "dwarfout.h" #include "ggc.h" +#include "timevar.h" #if USE_CPPLIB #include "cpplib.h" @@ -3429,7 +3430,6 @@ generate_ctor_and_dtor_functions_for_priority (n, data) void finish_file () { - long start_time, this_time; tree vars; int reconsider; size_t i; @@ -3463,7 +3463,7 @@ finish_file () generating the intiailzer for an object may cause templates to be instantiated, etc., etc. */ - start_time = get_run_time (); + timevar_push (TV_VARCONST); if (new_abi_rtti_p ()) emit_support_tinfos (); @@ -3686,9 +3686,7 @@ finish_file () if (back_end_hook) (*back_end_hook) (global_namespace); - this_time = get_run_time (); - parse_time -= this_time - start_time; - varconst_time += this_time - start_time; + timevar_pop (TV_VARCONST); if (flag_detailed_statistics) { diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 7dc6d30..ba32971 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -40,6 +40,7 @@ Boston, MA 02111-1307, USA. */ #include "output.h" #include "ggc.h" #include "tm_p.h" +#include "timevar.h" #ifdef MULTIBYTE_CHARS #include "mbchar.h" @@ -56,7 +57,6 @@ static int check_newline PARAMS ((void)); static int whitespace_cr PARAMS ((int)); static int skip_white_space PARAMS ((int)); static void finish_defarg PARAMS ((void)); -static int my_get_run_time PARAMS ((void)); static int interface_strcmp PARAMS ((const char *)); static int readescape PARAMS ((int *)); static char *extend_token_buffer PARAMS ((const char *)); @@ -388,17 +388,6 @@ get_time_identifier (name) } return time_identifier; } - -static inline int -my_get_run_time () -{ - int old_quiet_flag = quiet_flag; - int this_time; - quiet_flag = 0; - this_time = get_run_time (); - quiet_flag = old_quiet_flag; - return this_time; -} /* Table indexed by tree code giving a string containing a character classifying the tree code. Possibilities are @@ -488,7 +477,7 @@ init_filename_times () if (flag_detailed_statistics) { header_time = 0; - body_time = my_get_run_time (); + body_time = get_run_time (); TREE_INT_CST_LOW (TIME_IDENTIFIER_TIME (this_filename_time)) = body_time; } @@ -2390,7 +2379,7 @@ linenum: is charged against header time, and body time starts back at 0. */ if (flag_detailed_statistics) { - int this_time = my_get_run_time (); + int this_time = get_run_time (); tree time_identifier = get_time_identifier (TREE_STRING_POINTER (yylval.ttype)); header_time += this_time - body_time; TREE_INT_CST_LOW (TIME_IDENTIFIER_TIME (this_filename_time)) @@ -5086,7 +5075,7 @@ void dump_time_statistics () { register tree prev = 0, decl, next; - int this_time = my_get_run_time (); + int this_time = get_run_time (); TREE_INT_CST_LOW (TIME_IDENTIFIER_TIME (this_filename_time)) += this_time - body_time; |