diff options
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r-- | gcc/langhooks.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c index cb5da8c36fe..340cc99fa29 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic.h" #include "tree-diagnostic.h" #include "cgraph.h" +#include "timevar.h" #include "output.h" /* Do nothing; in many cases the default hook. */ @@ -298,10 +299,7 @@ write_global_declarations (void) tree globals, decl, *vec; int len, i; - /* This lang hook is dual-purposed, and also finalizes the - compilation unit. */ - finalize_compilation_unit (); - + timevar_start (TV_PHASE_DEFERRED); /* Really define vars that have had only a tentative definition. Really output inline functions that must actually be callable and have not been output so far. */ @@ -318,7 +316,17 @@ write_global_declarations (void) wrapup_global_declarations (vec, len); check_global_declarations (vec, len); + timevar_stop (TV_PHASE_DEFERRED); + + timevar_start (TV_PHASE_CGRAPH); + /* This lang hook is dual-purposed, and also finalizes the + compilation unit. */ + finalize_compilation_unit (); + timevar_stop (TV_PHASE_CGRAPH); + + timevar_start (TV_PHASE_CHECK_DBGINFO); emit_debug_global_declarations (vec, len); + timevar_stop (TV_PHASE_CHECK_DBGINFO); /* Clean up. */ free (vec); |