summaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-30 14:26:51 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-30 14:26:51 +0000
commitda67d82629fa5e769cbce16569de9a07212445b1 (patch)
tree5ecd0243cf1b240d9c4aba38a058cf969ac70a4d /gcc/lto-cgraph.c
parente55e3a4adc062bf2da14d90acb9430a2d8445718 (diff)
downloadgcc-da67d82629fa5e769cbce16569de9a07212445b1.tar.gz
* lto-cgraph.c (lto_output_varpool_node): Always output constant pool
references. * lto.c: Do not attempt to make constant pool references global. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 338250aeb0d..8a8855a70c1 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -374,10 +374,21 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node
gcc_assert (node->finalized || !node->analyzed);
gcc_assert (node->needed);
gcc_assert (!node->alias);
- /* FIXME: We have no idea how we move references around. For moment assume that
- everything is used externally. */
- bp_pack_value (bp, flag_wpa, 1); /* used_from_other_parition. */
- bp_pack_value (bp, boundary_p, 1); /* in_other_partition. */
+ /* Constant pool initializers can be de-unified into individual ltrans units.
+ FIXME: Alternatively at -Os we may want to avoid generating for them the local
+ labels and share them across LTRANS partitions. */
+ if (DECL_IN_CONSTANT_POOL (node->decl))
+ {
+ bp_pack_value (bp, 0, 1); /* used_from_other_parition. */
+ bp_pack_value (bp, 0, 1); /* in_other_partition. */
+ }
+ else
+ {
+ /* FIXME: We have no idea how we move references around. For moment assume that
+ everything is used externally. */
+ bp_pack_value (bp, flag_wpa, 1); /* used_from_other_parition. */
+ bp_pack_value (bp, boundary_p, 1); /* in_other_partition. */
+ }
/* Also emit any extra name aliases. */
for (alias = node->extra_name; alias; alias = alias->next)
count++;