This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug gcov-profile/58682] Profiling directed optimization doesn't play well with indirect inlining
- From: "paulo at matos-sorge dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 10 Oct 2013 13:53:34 +0000
- Subject: [Bug gcov-profile/58682] Profiling directed optimization doesn't play well with indirect inlining
- Auto-submitted: auto-generated
- References: <bug-58682-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58682
--- Comment #2 from Paulo J. Matos <paulo@matos-sorge.com> ---
Here's my reading of the problem:
core_bench_list calls core_list_mergesort which indirectly (through a function
pointer) calls cmp_idx. The global max_count variable is updated in the
beginning of inline_small_functions, but later we inline core_list_mergesort
into core_bench_list which adds cmp_idx to the list of callees of
core_list_mergesort generating this cgraph_node:
core_list_mergesort/32 (core_list_mergesort) @0x2b97efed8378
Type: function
Visibility: public
References:
Referring:
Function core_list_mergesort/32 is inline copy in core_bench_list/4
Clone of core_list_mergesort/11
Availability: local
Function flags: analyzed executed 2x body local finalized
Called by: core_bench_list/4 (2x) (1.00 per call) (inlined)
Calls: cmp_idx/2 (indirect_inlining) (217x) (100.00 per call)
Now there is an edge (core_list_mergesort -> cmp_idx) whose count is higher
(217) than the max_count global variable. This causes an ICE in edge_badness
which has the assertion (max_count >= edge_count).