diff mbox

[GOOGLE] Make LIPO aux function removal consistent

Message ID CAAe5K+U4E+daTKV9iyZNqA_DZ6J1xFf1ULKW8tXSfhMALbjmgA@mail.gmail.com
State New
Headers show

Commit Message

Teresa Johnson Dec. 20, 2014, 1:40 a.m. UTC
Passes regression tests, ok for google 4_9?

Thanks,
Teresa

2014-12-19  Teresa Johnson  <tejohnson@google.com>

        Google ref b/18800499
        * cgraph.c (cgraph_can_remove_if_no_direct_calls_and_refs_p): Make
        consistent with mark_functions_for_output for LIPO aux functions.

Comments

Teresa Johnson Dec. 23, 2014, 12:57 a.m. UTC | #1
Ping.
Teresa

On Fri, Dec 19, 2014 at 5:40 PM, Teresa Johnson <tejohnson@google.com> wrote:
> Passes regression tests, ok for google 4_9?
>
> Thanks,
> Teresa
>
> 2014-12-19  Teresa Johnson  <tejohnson@google.com>
>
>         Google ref b/18800499
>         * cgraph.c (cgraph_can_remove_if_no_direct_calls_and_refs_p): Make
>         consistent with mark_functions_for_output for LIPO aux functions.
>
> Index: cgraph.c
> ===================================================================
> --- cgraph.c    (revision 216977)
> +++ cgraph.c    (working copy)
> @@ -2464,6 +2464,8 @@ cgraph_can_remove_if_no_direct_calls_and_refs_p (s
>    /* Extern inlines can always go, we will use the external definition.  */
>    if (DECL_EXTERNAL (node->decl))
>      return true;
> +  if (cgraph_is_aux_decl_external (node))
> +    return true;
>    /* When function is needed, we can not remove it.  */
>    if (node->force_output || node->used_from_other_partition)
>      return false;
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
Xinliang David Li Dec. 26, 2014, 6:52 p.m. UTC | #2
Ok (perhaps merge  DECL_EXTERNAL and cgraph_is_aux_decl_external
checks together).

David

On Mon, Dec 22, 2014 at 4:57 PM, Teresa Johnson <tejohnson@google.com> wrote:
> Ping.
> Teresa
>
> On Fri, Dec 19, 2014 at 5:40 PM, Teresa Johnson <tejohnson@google.com> wrote:
>> Passes regression tests, ok for google 4_9?
>>
>> Thanks,
>> Teresa
>>
>> 2014-12-19  Teresa Johnson  <tejohnson@google.com>
>>
>>         Google ref b/18800499
>>         * cgraph.c (cgraph_can_remove_if_no_direct_calls_and_refs_p): Make
>>         consistent with mark_functions_for_output for LIPO aux functions.
>>
>> Index: cgraph.c
>> ===================================================================
>> --- cgraph.c    (revision 216977)
>> +++ cgraph.c    (working copy)
>> @@ -2464,6 +2464,8 @@ cgraph_can_remove_if_no_direct_calls_and_refs_p (s
>>    /* Extern inlines can always go, we will use the external definition.  */
>>    if (DECL_EXTERNAL (node->decl))
>>      return true;
>> +  if (cgraph_is_aux_decl_external (node))
>> +    return true;
>>    /* When function is needed, we can not remove it.  */
>>    if (node->force_output || node->used_from_other_partition)
>>      return false;
>>
>> --
>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
diff mbox

Patch

Index: cgraph.c
===================================================================
--- cgraph.c    (revision 216977)
+++ cgraph.c    (working copy)
@@ -2464,6 +2464,8 @@  cgraph_can_remove_if_no_direct_calls_and_refs_p (s
   /* Extern inlines can always go, we will use the external definition.  */
   if (DECL_EXTERNAL (node->decl))
     return true;
+  if (cgraph_is_aux_decl_external (node))
+    return true;
   /* When function is needed, we can not remove it.  */
   if (node->force_output || node->used_from_other_partition)
     return false;