Statistics finalization tweek
Jan Hubicka
hubicka@ucw.cz
Tue Jun 22 12:15:00 GMT 2010
Hi,
looking into callgrind, one of most common callers of htab_traverse turns out to be
statistics (even when it is disabled).
This is because we call statistics_fini_pass for every function after every IPA pass
rather than just once that I think should be sufficient ;)
I wonder why we need to walk the table all the time?
Bootstrapped/regtested x86_64-linux, OK?
Honza
* passes.c (execute_function_todo): Move call of statistics_fini_pass
to ...
(execute_todo) ... this one.
Index: passes.c
===================================================================
--- passes.c (revision 160988)
+++ passes.c (working copy)
@@ -1175,8 +1175,6 @@ execute_function_todo (void *data)
if (!flags)
return;
- statistics_fini_pass ();
-
/* Always cleanup the CFG before trying to update SSA. */
if (flags & TODO_cleanup_cfg)
{
@@ -1288,6 +1286,8 @@ execute_todo (unsigned int flags)
/* Inform the pass whether it is the first time it is run. */
first_pass_instance = (flags & TODO_mark_first_instance) != 0;
+ statistics_fini_pass ();
+
do_per_function (execute_function_todo, (void *)(size_t) flags);
/* Always remove functions just as before inlining: IPA passes might be
More information about the Gcc-patches
mailing list