[tree-profiling] Fix profiling
Jan Hubicka
jh@suse.cz
Mon Nov 29 04:14:00 GMT 2004
Hi,
this patch finally fix the rest of coverage failures. The problem has
been that coverage_begin_function has not been properly paired with
coverage_end_function any longer.
Comitted as obvious.
Honza
2004-11-29 Jan Hubicka <jh@suse.cz>
* cgraphunit.c (cgraph_decide_inlining_of_small_function): Kill
forgotten sanity check.
* passes.c (rest_of_clean_state): Do not call coverage_end_function.
* profile.c (branch_prob): Call it here.
Index: cgraphunit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
retrieving revision 1.1.4.35.2.28
diff -c -3 -p -r1.1.4.35.2.28 cgraphunit.c
*** cgraphunit.c 29 Nov 2004 02:39:31 -0000 1.1.4.35.2.28
--- cgraphunit.c 29 Nov 2004 02:56:10 -0000
*************** cgraph_decide_inlining_of_small_function
*** 1752,1759 ****
for (node = cgraph_nodes; node; node = node->next)
{
- if (node->analyzed && !DECL_STRUCT_FUNCTION (node->decl))
- abort ();
if (!node->local.inlinable || !node->callers
|| node->local.disregard_inline_limits)
continue;
--- 1752,1757 ----
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.2.4.17
diff -c -3 -p -r2.2.4.17 passes.c
*** passes.c 17 Nov 2004 22:07:40 -0000 2.2.4.17
--- passes.c 29 Nov 2004 02:56:11 -0000
*************** static void
*** 1491,1497 ****
rest_of_clean_state (void)
{
rtx insn, next;
- coverage_end_function ();
/* It is very important to decompose the RTL instruction chain here:
debug information keeps pointing into CODE_LABEL insns inside the function
--- 1491,1496 ----
Index: profile.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/profile.c,v
retrieving revision 1.93.2.25.2.12
diff -c -3 -p -r1.93.2.25.2.12 profile.c
*** profile.c 22 Oct 2004 21:51:38 -0000 1.93.2.25.2.12
--- profile.c 29 Nov 2004 02:56:11 -0000
*************** branch_prob (void)
*** 1139,1144 ****
--- 1139,1145 ----
free_edge_list (el);
if (flag_branch_probabilities)
profile_status = PROFILE_READ;
+ coverage_end_function ();
}
/* Union find algorithm implementation for the basic blocks using
More information about the Gcc-patches
mailing list