aboutsummaryrefslogtreecommitdiff
path: root/gcc/timevar.def
diff options
context:
space:
mode:
authorLawrence Crowl <crowl@google.com>2011-05-02 22:19:48 +0000
committerLawrence Crowl <crowl@gcc.gnu.org>2011-05-02 22:19:48 +0000
commit575bfb0052b008995fc992d0728f7bea2173391a (patch)
treee709db0f9ae81e48e0b44043f323c0d49b1f2a66 /gcc/timevar.def
parent9c69dcea0d67714ca0ce52317725ccf1644ce93e (diff)
downloadgcc-575bfb0052b008995fc992d0728f7bea2173391a.zip
gcc-575bfb0052b008995fc992d0728f7bea2173391a.tar.gz
gcc-575bfb0052b008995fc992d0728f7bea2173391a.tar.bz2
Upgrade the utility of timevars.
Index: gcc/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * timevar.h (timevar_cond_start): Remove unused POP_TIMEVAR_AND_RETURN. (timevar_cond_start): New for starting a timer only when it is not already running. (timevar_cond_stop): New for stopping a timer when it was not already running. * timevar.c (timevar_stop): Enable start/stop timers to start again. (timevar_cond_start): New as above. (timevar_cond_stop): New as above. * timevar.def: Add start/stop timers for compiler phases, TV_PHASE_SETUP, TV_PHASE_PARSING, TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO (C), TV_PHASE_CHECK_DBGINFO (C++), TV_PHASE_GENERATE, and TV_PHASE_FINALIZE. Change push/pop timer TV_PARSE to TV_PARSE_GLOBAL. Add push/pop timers TV_PARSE_STRUCT, TV_PARSE_ENUM, TV_PARSE_FUNC, TV_PARSE_INLINE, TV_PARSE_INMETH, TV_TEMPLATE_INST. Change push/pop timer TV_NAME_LOOKUP into a start/stop timer. Make unused TV_OVERLOAD into a start/stop timer. Remove unused timers TV_OVERLOAD, TV_TEMPLATE_INSTANTIATION. Mark the strings for TV_NAME_LOOKUP and TV_OVERLOAD with a "|" to indicate that they are start/stop timers. * toplev.c (compile_file): Change TV_PARSE to TV_PARSE_GLOBAL. Add start/stop timers TV_PHASE_PARSING and TV_PHASE_GENERATE. Move initialization to do_compile. (do_compile): Add initialization from above. Add start/stop timers TV_PHASE_SETUP and TV_PHASE_FINALIZE. * c-decl.c (c_write_global_declarations): Add start/stop of TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_DBGINFO. * c-parser.c (c_parser_declaration_or_fndef): Push/pop TV_PARSE_FUNC or TV_PARSE_INLINE, as appropriate. (c_parser_enum_specifier): Push/pop TV_PARSE_ENUM. (c_parser_struct_or_union_specifier): Push/pop TV_PARSE_STRUCT. Index: gcc/cp/ChangeLog 2011-04-27 Lawrence Crowl <crowl@google.com> * decl.c: (push_local_name): Change TV_NAME_LOOKUP to start/stop. (poplevel): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (define_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (xref_tag): Likewise. (lookup_label): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. * pt.c: (instantiate_class_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (instantiate_template): Add a wrapper to push/pop new TV_TEMPLATE_INST. (lookup_template_class): Refactor timevar calls out to a wrapper function. Change use of TV_NAME_LOOKUP to TV_TEMPLATE_INST. (instantiate_decl): Change TV_PARSE to TV_TEMPLATE_INST. * name-lookup.c: (store_bindings): Change TV_NAME_LOOKUP to start/stop. (poplevel_class): Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_namespace): Likewise. (pop_nested_namespace): Likewise. (pushdecl_namespace_level): Likewise. (store_class_bindings): Likewise. (push_to_top_level): Likewise. (identifier_type_value): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start/stop. (find_binding): Likewise. (push_using_decl): Likewise. (lookup_arg_dependent): Likewise. (push_using_directive): Likewise. (qualified_lookup_using_namespace): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start/stop. (lookup_type_current_level): Likewise. Refactor inner return to break. (pushdecl_class_level): Refactor POP_TIMEVAR_AND_RETURN to plain code. Change TV_NAME_LOOKUP to start_cond/stop_cond. (pushdecl_top_level_1): Likewise. (lookup_using_namespace): Likewise. (pushdecl_with_scope): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. (push_overloaded_decl): Likewise. (push_class_level_binding): Likewise. (namespace_binding): Likewise. (set_namespace_binding): Likewise. (supplement_binding): Likewise. (unqualified_namespace_lookup): Likewise. (lookup_name_real): Likewise. (lookup_type_scope): Likewise. (namespace_ancestor): Likewise. (lookup_name_innermost_nonclass_level): Likewise. (pushtag): Likewise. (pop_from_top_level): Likewise. (pushdecl_maybe_friend): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Wrap long lines. (add_using_namespace): Refactor timevar calls out to a wrapper function. Change TV_NAME_LOOKUP to start_cond/stop_cond. Bypass wrapper on call to self. * decl2.c: (cp_write_global_declarations): Add start/stop of new TV_PHASE_DEFERRED, TV_PHASE_CGRAPH, TV_PHASE_CHECK_DBGINFO. Remove push/pop calls to TV_VARCONST. * parser.c: Add include of "timevar.h". (cp_parser_explicit_instantiation): Add push/pop calls to TV_TEMPLATE_INST. (cp_parser_enum_specifier): Add push/pop calls to new TV_PARSE_ENUM. (cp_parser_class_specifier): Add wrapper to add push/pop calls to TV_PARSE_STRUCT. (cp_parser_function_definition_from_specifiers_and_declarator): Add push/pop calls to new TV_PARSE_FUNC or TV_PARSE_INLINE. (cp_parser_late_parsing_for_member): Add push/pop calls to new TV_PARSE_INMETH. * call.c: Add include of "timevar.h". (convert_class_to_reference): Wrap and add push/pop calls to TV_OVERLOAD. (build_op_call): Likewise. (build_conditional_expr): Likewise. (build_new_op): Likewise. (build_new_method_call): Likewise. (build_user_type_conversion): Reorganize to single return and add push/pop calls to TV_OVERLOAD. (perform_overload_resolution): Likewise. * Make-lang.in: Add dependence of call.o and parser.o on $(TIMEVAR_H). From-SVN: r173277
Diffstat (limited to 'gcc/timevar.def')
-rw-r--r--gcc/timevar.def23
1 files changed, 19 insertions, 4 deletions
diff --git a/gcc/timevar.def b/gcc/timevar.def
index cd306b8..2921c90 100644
--- a/gcc/timevar.def
+++ b/gcc/timevar.def
@@ -33,6 +33,18 @@
/* The total execution time. */
DEFTIMEVAR (TV_TOTAL , "total time")
+DEFTIMEVAR (TV_PHASE_SETUP , "phase setup")
+DEFTIMEVAR (TV_PHASE_PARSING , "phase parsing")
+DEFTIMEVAR (TV_PHASE_DEFERRED , "phase lang. deferred")
+DEFTIMEVAR (TV_PHASE_CGRAPH , "phase cgraph")
+DEFTIMEVAR (TV_PHASE_DBGINFO , "phase debug info")
+DEFTIMEVAR (TV_PHASE_CHECK_DBGINFO , "phase check & debug info")
+DEFTIMEVAR (TV_PHASE_GENERATE , "phase generate")
+DEFTIMEVAR (TV_PHASE_FINALIZE , "phase finalize")
+
+/* Concurrent timers, indicated by "|". */
+DEFTIMEVAR (TV_NAME_LOOKUP , "|name lookup")
+DEFTIMEVAR (TV_OVERLOAD , "|overload resolution")
/* Time spent garbage-collecting. */
DEFTIMEVAR (TV_GC , "garbage collection")
@@ -102,8 +114,13 @@ DEFTIMEVAR (TV_REBUILD_JUMP , "rebuild jump labels")
/* Timing in various stages of the compiler. */
DEFTIMEVAR (TV_CPP , "preprocessing")
DEFTIMEVAR (TV_LEX , "lexical analysis")
-DEFTIMEVAR (TV_PARSE , "parser")
-DEFTIMEVAR (TV_NAME_LOOKUP , "name lookup")
+DEFTIMEVAR (TV_PARSE_GLOBAL , "parser (global)")
+DEFTIMEVAR (TV_PARSE_STRUCT , "parser struct body")
+DEFTIMEVAR (TV_PARSE_ENUM , "parser enumerator list")
+DEFTIMEVAR (TV_PARSE_FUNC , "parser function body")
+DEFTIMEVAR (TV_PARSE_INLINE , "parser inl. func. body")
+DEFTIMEVAR (TV_PARSE_INMETH , "parser inl. meth. body")
+DEFTIMEVAR (TV_TEMPLATE_INST , "template instantiation")
DEFTIMEVAR (TV_INLINE_HEURISTICS , "inline heuristics")
DEFTIMEVAR (TV_INTEGRATION , "integration")
DEFTIMEVAR (TV_TREE_GIMPLIFY , "tree gimplify")
@@ -170,8 +187,6 @@ DEFTIMEVAR (TV_CGRAPH_VERIFY , "callgraph verifier")
DEFTIMEVAR (TV_DOM_FRONTIERS , "dominance frontiers")
DEFTIMEVAR (TV_DOMINANCE , "dominance computation")
DEFTIMEVAR (TV_CONTROL_DEPENDENCES , "control dependences")
-DEFTIMEVAR (TV_OVERLOAD , "overload resolution")
-DEFTIMEVAR (TV_TEMPLATE_INSTANTIATION, "template instantiation")
DEFTIMEVAR (TV_OUT_OF_SSA , "out of ssa")
DEFTIMEVAR (TV_VAR_EXPAND , "expand vars")
DEFTIMEVAR (TV_EXPAND , "expand")