This is the mail archive of the gcc-patches@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]

Re: [GOOGLE] Skip fake LIPO edges when replacing calls with local alias


On Fri, Oct 3, 2014 at 9:31 AM, Xinliang David Li <davidxl@google.com> wrote:
> The name 'e' is used for both outer scope edge and inner scope one.

No, the declaration was moved from the inner scope to the outer scope.

Teresa

> This is confusing.
>
> David
>
>
> On Fri, Oct 3, 2014 at 9:27 AM, Teresa Johnson <tejohnson@google.com> wrote:
>> Adds handling in this block of code (new in gcc/4_9 and therefore
>> google/4_9) for LIPO fake edges for indirect calls, which don't have a
>> call_stmt set and cannot be redirected.
>>
>> Passes regression tests, ok for google/4_9 branch?
>>
>> Teresa
>>
>> 2014-10-03  Teresa Johnson  <tejohnson@google.com>
>>
>>         Google ref b/17378050
>>         * ipa.c (function_and_variable_visibility): Skip LIPO fake indirect
>>         call edges.
>>
>> Index: ipa.c
>> ===================================================================
>> --- ipa.c       (revision 215830)
>> +++ ipa.c       (working copy)
>> @@ -1146,12 +1146,15 @@ function_and_variable_visibility (bool whole_progr
>>        if (node->callers && can_replace_by_local_alias (node))
>>         {
>>           struct cgraph_node *alias = cgraph
>> (symtab_nonoverwritable_alias (node));
>> +         struct cgraph_edge *e, *next_caller;
>>
>>           if (alias && alias != node)
>>             {
>> -             while (node->callers)
>> +              for (e = node->callers; e; e = next_caller)
>>                 {
>> -                 struct cgraph_edge *e = node->callers;
>> +                  next_caller = e->next_caller;
>> +                 if (L_IPO_COMP_MODE && cgraph_is_fake_indirect_call_edge (e))
>> +                   continue;
>>
>>                   cgraph_redirect_edge_callee (e, alias);
>>                   if (gimple_has_body_p (e->caller->decl))
>>
>>
>> --
>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413



-- 
Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413


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