https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71672

            Bug ID: 71672
           Summary: inlining indirect calls does not work with autofdo
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: andi-gcc at firstfloor dot org
  Target Milestone: ---

The current mainline version of autofdo doesn't inline indirect calls based on
profiling data.

I instrumented a bootstrap and it never triggers.

gcc.dg/tree-prof/indir-call-prof.c

also fails (needs the patch kit in
https://gcc.gnu.org/ml/gcc-patches/2016-06/msg01786.html applied first). 

I did some debugging and it seems to give up in update_inlined_ind_target()
here

 772   /* Program behavior changed, original promoted (and inlined) target is
not
 773      hot any more. Will avoid promote the original target.
 774 
 775      To check if original promoted target is still hot, we check the total
 776      count of the unpromoted targets (stored in old_info). If it is no
less
 777      than half of the callsite count (stored in INFO), the original
promoted
 778      target is considered not hot any more.  */
 779   if (total >= info->count / 2)

but even with the test commented out it doesn't work.

Reply via email to