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
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
Issue 6101045: [google-4_6] disable localization of hidden symbols in streaming LIPO
Created 13 years ago by xur
Modified 13 years ago
Reviewers: davidxl
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6/
Comments: 0