This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Fix improper timevar nesting
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Feb 2009 22:35:42 -0500
- Subject: [lto] Fix improper timevar nesting
I had missed the early return out of lto_1_to_1_map. This was
causing various failures with -ftime-report.
Tested on x86_64.
Diego.
lto/ChangeLog
* lto.c (lto_1_to_1_map): Make sure the timer is popped
when returning early.
Index: lto/lto.c
===================================================================
--- lto/lto.c (revision 144312)
+++ lto/lto.c (working copy)
@@ -522,7 +522,7 @@ lto_1_to_1_map (void)
{
set = cgraph_node_set_new ();
VEC_safe_push (cgraph_node_set, gc, lto_cgraph_node_sets, set);
- return;
+ goto finish;
}
pmap = pointer_map_create ();
@@ -548,6 +548,7 @@ lto_1_to_1_map (void)
pointer_map_destroy (pmap);
+finish:
timevar_pop (TV_WHOPR_WPA);
}