The real bug is in debug info. The callgraph should look like:

foo->D1EV->D4EV

While everything is inlined into foo, but in the inline stack D1EV is missing.

This patch does not fix that problem, but is also reasonable because
if callee's definition is not available, we should not promote the
indirect call anyway.

Dehao

On Tue, Dec 16, 2014 at 2:45 PM, Xinliang David Li <davi...@google.com> wrote:
> Does it paper over the real bug?
>
> David
>
> On Tue, Dec 16, 2014 at 2:38 PM, Dehao Chen <de...@google.com> wrote:
>> This patch fixes the bug for undefined symbol in AutoFDO build.
>>
>> Testing on going. OK for google-4_9 branch?
>>
>> Thanks,
>> Dehao
>>
>> Index: gcc/auto-profile.c
>> ===================================================================
>> --- gcc/auto-profile.c (revision 218784)
>> +++ gcc/auto-profile.c (working copy)
>> @@ -592,6 +592,8 @@
>>   continue;
>>        if (!check_ic_target (stmt, node))
>>   continue;
>> +      if (!node->definition)
>> +        continue;
>>        (*map)[callee] = iter->second->total_count ();
>>        ret += iter->second->total_count ();
>>      }

Reply via email to