[PATCH][RFC] Glob unaccounted time per fn to passes, not expand

Richard Guenther rguenther@suse.de
Mon Jan 7 19:33:00 GMT 2008


Currently, if you disable pushing some timevars (like for example the
time accounted for cfg_cleanup), this time gets attributed to expand.
I'd like to attribute this to the pass that triggered the TODO_ instead,
which more easily allows to pin-point the cause of excess time in
cfgcleanup and SSA update.

Like with the following.  Of course it still requires you to edit
gcc sources if you want such globbing to happen, so if someone wants
to work on -fdisable-timevar-XXX that would be nice ;)

?

Thanks,
Richard.

Index: passes.c
===================================================================
--- passes.c	(revision 131377)
+++ passes.c	(working copy)
@@ -1119,10 +1119,6 @@ execute_one_pass (struct tree_opt_pass *
       do_per_function (clear_last_verified, NULL);
     }
 
-  /* Stop timevar.  */
-  if (pass->tv_id)
-    timevar_pop (pass->tv_id);
-
   do_per_function (update_properties_after_pass, pass);
 
   if (initializing_dump
@@ -1160,6 +1156,10 @@ execute_one_pass (struct tree_opt_pass *
   /* Reset in_gimple_form to not break non-unit-at-a-time mode.  */
   in_gimple_form = false;
 
+  /* Stop timevar.  */
+  if (pass->tv_id)
+    timevar_pop (pass->tv_id);
+
   return true;
 }
 



More information about the Gcc-patches mailing list