This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gcov-profile/58682] Profiling directed optimization doesn't play well with indirect inlining


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]