summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-optimize.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a70de55ce6f..6dac1c7220a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-10-15 Diego Novillo <dnovillo@redhat.com>
+
+ * tree-optimize.c (execute_one_pass): Stop timer right after
+ executing the pass.
+
2004-10-14 Andrew Pinski <pinskia@physics.uc.edu>
Revert:
diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c
index 4fd6240fb94..fed16c38b8c 100644
--- a/gcc/tree-optimize.c
+++ b/gcc/tree-optimize.c
@@ -502,6 +502,10 @@ execute_one_pass (struct tree_opt_pass *pass)
if (pass->execute)
pass->execute ();
+ /* Stop timevar. */
+ if (pass->tv_id)
+ timevar_pop (pass->tv_id);
+
if (dump_file
&& (pass->properties_provided & (PROP_cfg | PROP_rtl))
== (PROP_cfg | PROP_rtl))
@@ -513,9 +517,7 @@ execute_one_pass (struct tree_opt_pass *pass)
if (todo)
execute_todo (pass->properties_provided, todo);
- /* Close down timevar and dump file. */
- if (pass->tv_id)
- timevar_pop (pass->tv_id);
+ /* Flush and close dump file. */
if (dump_file_name)
{
free ((char *) dump_file_name);