(C++) timevar tweak
Jason Merrill
jason@redhat.com
Thu Jun 15 14:19:00 GMT 2000
2000-06-13 Jason Merrill <jason@redhat.com>
* Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
* semantics.c (expand_body): Push to TV_INTEGRATION here.
* optimize.c (optimize_function): Not here.
* pt.c (instantiate_decl): Push to TV_PARSE.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/Makefile.in,v
retrieving revision 1.89
diff -c -p -r1.89 Makefile.in
*** Makefile.in 2000/06/14 17:26:18 1.89
--- Makefile.in 2000/06/15 21:18:51
*************** PARSE_C = $(srcdir)/parse.c
*** 211,216 ****
--- 211,217 ----
EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
GGC_H = $(srcdir)/../ggc.h $(srcdir)/../varray.h
HTAB_H = $(srcdir)/../../include/hashtab.h
+ TIMEVAR_H = $(srcdir)/../timevar.h $(srcdir)/../timevar.def
parse.o : $(PARSE_C) $(CXX_TREE_H) $(srcdir)/../flags.h lex.h \
$(srcdir)/../except.h $(srcdir)/../output.h $(srcdir)/../system.h \
*************** repo.o : repo.c $(CXX_TREE_H) \
*** 306,312 ****
semantics.o: semantics.c $(CXX_TREE_H) lex.h \
$(srcdir)/../except.h $(srcdir)/../toplev.h \
$(srcdir)/../flags.h $(GGC_H) \
! $(srcdir)/../output.h $(RTL_H)
dump.o: dump.c $(CXX_TREE_H)
optimize.o: optimize.c $(CXX_TREE_H) \
$(srcdir)/../rtl.h $(srcdir)/../integrate.h ../insn-config.h \
--- 307,313 ----
semantics.o: semantics.c $(CXX_TREE_H) lex.h \
$(srcdir)/../except.h $(srcdir)/../toplev.h \
$(srcdir)/../flags.h $(GGC_H) \
! $(srcdir)/../output.h $(RTL_H) $(TIMEVAR_H)
dump.o: dump.c $(CXX_TREE_H)
optimize.o: optimize.c $(CXX_TREE_H) \
$(srcdir)/../rtl.h $(srcdir)/../integrate.h ../insn-config.h \
Index: optimize.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/optimize.c,v
retrieving revision 1.37
diff -c -p -r1.37 optimize.c
*** optimize.c 2000/06/12 19:26:43 1.37
--- optimize.c 2000/06/15 21:18:54
*************** Software Foundation, 59 Temple Place - S
*** 28,34 ****
#include "input.h"
#include "integrate.h"
#include "varray.h"
- #include "timevar.h"
/* To Do:
--- 28,33 ----
*************** optimize_function (fn)
*** 810,817 ****
tree prev_fn;
struct saved_scope *s;
- timevar_push (TV_INTEGRATION);
-
/* Clear out ID. */
memset (&id, 0, sizeof (id));
--- 809,814 ----
*************** optimize_function (fn)
*** 842,849 ****
/* Clean up. */
VARRAY_FREE (id.fns);
VARRAY_FREE (id.target_exprs);
-
- timevar_pop (TV_INTEGRATION);
}
}
--- 839,844 ----
Index: pt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/pt.c,v
retrieving revision 1.439
diff -c -p -r1.439 pt.c
*** pt.c 2000/06/14 05:30:04 1.439
--- pt.c 2000/06/15 21:19:00
*************** Boston, MA 02111-1307, USA. */
*** 44,49 ****
--- 44,50 ----
#include "defaults.h"
#include "ggc.h"
#include "hashtab.h"
+ #include "timevar.h"
/* The type of functions taking a tree, and some additional data, and
returning an int. */
*************** instantiate_decl (d, defer_ok)
*** 9530,9535 ****
--- 9531,9538 ----
if (! push_tinst_level (d))
return d;
+ timevar_push (TV_PARSE);
+
/* Set TD to the template whose DECL_TEMPLATE_RESULT is the pattern
for the instantiation. This is not always the most general
template. Consider, for example:
*************** out:
*** 9720,9725 ****
--- 9723,9730 ----
pop_from_top_level ();
pop_tinst_level ();
+
+ timevar_pop (TV_PARSE);
return d;
}
Index: semantics.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/semantics.c,v
retrieving revision 1.147
diff -c -p -r1.147 semantics.c
*** semantics.c 2000/06/09 16:23:46 1.147
--- semantics.c 2000/06/15 21:19:01
*************** expand_body (fn)
*** 2789,2798 ****
return;
}
! timevar_push (TV_EXPAND);
/* Optimize the body of the function before expanding it. */
optimize_function (fn);
/* Save the current file name and line number. When we expand the
body of the function, we'll set LINENO and INPUT_FILENAME so that
--- 2789,2801 ----
return;
}
! timevar_push (TV_INTEGRATION);
/* Optimize the body of the function before expanding it. */
optimize_function (fn);
+
+ timevar_pop (TV_INTEGRATION);
+ timevar_push (TV_EXPAND);
/* Save the current file name and line number. When we expand the
body of the function, we'll set LINENO and INPUT_FILENAME so that
More information about the Gcc-patches
mailing list