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-4_6] disable localization of hidden symbols in streaming LIPO (issue6101045)


ok.

thanks,

David

On Fri, Apr 20, 2012 at 2:13 PM, Rong Xu <xur@google.com> wrote:
> Hi,
>
> This patch is for google-4_6 branch only.
>
> It disables the localization of hidden and internal symbols in streaming
> LIPO. Otherwise, we may have undefines in link time because of the reference in
> other module that is not include the define module into module group.
>
> Tested with google internal benchmarks, gcc regression and bootstrap.
>
> Thanks,
>
> -Rong
>
> 2012-04-20 ? Rong Xu ?<xur@google.com>
>
> ? ? ? ?* gcc/ipa.c (cgraph_externally_visible_p): Not localize hidden symbols
> ? ? ? ?in streaming LIPO.
> ? ? ? ?(varpool_externally_visible_p): Ditto.
>
> Index: gcc/ipa.c
> ===================================================================
> --- gcc/ipa.c ? (revision 186600)
> +++ gcc/ipa.c ? (working copy)
> @@ -790,7 +790,9 @@ cgraph_externally_visible_p (struct cgraph_node *n
> ? ? return false;
>
> ? /* When doing link time optimizations, hidden symbols become local. ?*/
> - ?if (in_lto_p
> + ?/* Disable this in streaming LIPO, as the defition may not be seen by all
> + ? ? the references. ?*/
> + ?if (in_lto_p && !flag_ripa_stream
> ? ? ? && (DECL_VISIBILITY (node->decl) == VISIBILITY_HIDDEN
> ? ? ? ? ?|| DECL_VISIBILITY (node->decl) == VISIBILITY_INTERNAL)
> ? ? ? /* Be sure that node is defined in IR file, not in other object
> @@ -885,7 +887,9 @@ varpool_externally_visible_p (struct varpool_node
> ? ? return false;
>
> ? /* When doing link time optimizations, hidden symbols become local. ?*/
> - ?if (in_lto_p
> + ?/* Disable this in streaming LIPO, as the defition may not be seen by all
> + ? ? the references. ?*/
> + ?if (in_lto_p && !flag_ripa_stream
> ? ? ? && (DECL_VISIBILITY (vnode->decl) == VISIBILITY_HIDDEN
> ? ? ? ? ?|| DECL_VISIBILITY (vnode->decl) == VISIBILITY_INTERNAL)
> ? ? ? /* Be sure that node is defined in IR file, not in other object
>
> --
> This patch is available for review at http://codereview.appspot.com/6101045


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