This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GOOGLE] Skip fake LIPO edges when replacing calls with local alias
- From: Teresa Johnson <tejohnson at google dot com>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 3 Oct 2014 09:45:53 -0700
- Subject: Re: [GOOGLE] Skip fake LIPO edges when replacing calls with local alias
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+X3PdZ4a_g6Rf1=QELUG8d-Q08HyMs3bTA-EjEVH17LqQ at mail dot gmail dot com> <CAAkRFZJgTCZsJVYytMScd5UrsO+P88Ofi2Wv0Mj4RfXdTD88AQ at mail dot gmail dot com>
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