summaryrefslogtreecommitdiff
path: root/gcc/varpool.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-21 14:41:03 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-21 14:41:03 +0000
commite288c7a9d241b2ec4f17a2a9b3a058fc30c86725 (patch)
tree518cccaa543aa060a4a7880a9edcef6b9842add4 /gcc/varpool.c
parentf855a9b7ef29819b5a8ca64d0cbf4facce909c80 (diff)
downloadgcc-e288c7a9d241b2ec4f17a2a9b3a058fc30c86725.tar.gz
* lto.c (globalize_cross_file_statics): When function has address taken,
it needs to be public. * varpool.c (decide_is_variable_needed): Variable is always needed during ltrans. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158609 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varpool.c')
-rw-r--r--gcc/varpool.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/varpool.c b/gcc/varpool.c
index a13742d4957..40decfc867b 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -230,6 +230,12 @@ varpool_reset_queue (void)
bool
decide_is_variable_needed (struct varpool_node *node, tree decl)
{
+ /* We do not track variable references at all and thus have no idea if the
+ variable was referenced in some other partition or not.
+ FIXME: We really need address taken edges in callgraph and varpool to
+ drive WPA and decide whether other partition might reference it or not. */
+ if (flag_ltrans)
+ return true;
/* If the user told us it is used, then it must be so. */
if ((node->externally_visible && !DECL_COMDAT (decl))
|| node->force_output)