* Makefile.in (LIBGCOV_INTERFACE): Move _gcov_dump ...
[official-gcc.git] / gcc / varpool.c
blob8350adb2d87fdecf6a4624acb63be2cc5e658083
1 /* Callgraph handling code.
2 Copyright (C) 2003-2014 Free Software Foundation, Inc.
3 Contributed by Jan Hubicka
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 #include "config.h"
22 #include "system.h"
23 #include "coretypes.h"
24 #include "tm.h"
25 #include "tree.h"
26 #include "varasm.h"
27 #include "cgraph.h"
28 #include "langhooks.h"
29 #include "diagnostic-core.h"
30 #include "hashtab.h"
31 #include "timevar.h"
32 #include "debug.h"
33 #include "target.h"
34 #include "output.h"
35 #include "gimple-expr.h"
36 #include "flags.h"
37 #include "pointer-set.h"
38 #include "tree-ssa-alias.h"
39 #include "gimple.h"
40 #include "lto-streamer.h"
41 #include "hash-set.h"
43 const char * const tls_model_names[]={"none", "tls-emulated", "tls-real",
44 "tls-global-dynamic", "tls-local-dynamic",
45 "tls-initial-exec", "tls-local-exec"};
47 /* List of hooks triggered on varpool_node events. */
48 struct varpool_node_hook_list {
49 varpool_node_hook hook;
50 void *data;
51 struct varpool_node_hook_list *next;
54 /* List of hooks triggered when a node is removed. */
55 struct varpool_node_hook_list *first_varpool_node_removal_hook;
56 /* List of hooks triggered when an variable is inserted. */
57 struct varpool_node_hook_list *first_varpool_variable_insertion_hook;
59 /* Register HOOK to be called with DATA on each removed node. */
60 struct varpool_node_hook_list *
61 varpool_add_node_removal_hook (varpool_node_hook hook, void *data)
63 struct varpool_node_hook_list *entry;
64 struct varpool_node_hook_list **ptr = &first_varpool_node_removal_hook;
66 entry = (struct varpool_node_hook_list *) xmalloc (sizeof (*entry));
67 entry->hook = hook;
68 entry->data = data;
69 entry->next = NULL;
70 while (*ptr)
71 ptr = &(*ptr)->next;
72 *ptr = entry;
73 return entry;
76 /* Remove ENTRY from the list of hooks called on removing nodes. */
77 void
78 varpool_remove_node_removal_hook (struct varpool_node_hook_list *entry)
80 struct varpool_node_hook_list **ptr = &first_varpool_node_removal_hook;
82 while (*ptr != entry)
83 ptr = &(*ptr)->next;
84 *ptr = entry->next;
85 free (entry);
88 /* Call all node removal hooks. */
89 static void
90 varpool_call_node_removal_hooks (varpool_node *node)
92 struct varpool_node_hook_list *entry = first_varpool_node_removal_hook;
93 while (entry)
95 entry->hook (node, entry->data);
96 entry = entry->next;
100 /* Register HOOK to be called with DATA on each inserted node. */
101 struct varpool_node_hook_list *
102 varpool_add_variable_insertion_hook (varpool_node_hook hook, void *data)
104 struct varpool_node_hook_list *entry;
105 struct varpool_node_hook_list **ptr = &first_varpool_variable_insertion_hook;
107 entry = (struct varpool_node_hook_list *) xmalloc (sizeof (*entry));
108 entry->hook = hook;
109 entry->data = data;
110 entry->next = NULL;
111 while (*ptr)
112 ptr = &(*ptr)->next;
113 *ptr = entry;
114 return entry;
117 /* Remove ENTRY from the list of hooks called on inserted nodes. */
118 void
119 varpool_remove_variable_insertion_hook (struct varpool_node_hook_list *entry)
121 struct varpool_node_hook_list **ptr = &first_varpool_variable_insertion_hook;
123 while (*ptr != entry)
124 ptr = &(*ptr)->next;
125 *ptr = entry->next;
126 free (entry);
129 /* Call all node insertion hooks. */
130 void
131 varpool_call_variable_insertion_hooks (varpool_node *node)
133 struct varpool_node_hook_list *entry = first_varpool_variable_insertion_hook;
134 while (entry)
136 entry->hook (node, entry->data);
137 entry = entry->next;
141 /* Allocate new callgraph node and insert it into basic data structures. */
143 varpool_node *
144 varpool_node::create_empty (void)
146 varpool_node *node = ggc_cleared_alloc<varpool_node> ();
147 node->type = SYMTAB_VARIABLE;
148 return node;
151 /* Return varpool node assigned to DECL. Create new one when needed. */
152 varpool_node *
153 varpool_node::get_create (tree decl)
155 varpool_node *node = varpool_node::get (decl);
156 gcc_checking_assert (TREE_CODE (decl) == VAR_DECL);
157 if (node)
158 return node;
160 node = varpool_node::create_empty ();
161 node->decl = decl;
162 node->register_symbol ();
163 return node;
166 /* Remove variable from symbol table. */
168 void
169 varpool_node::remove (void)
171 varpool_call_node_removal_hooks (this);
172 unregister ();
174 /* When streaming we can have multiple nodes associated with decl. */
175 if (cgraph_state == CGRAPH_LTO_STREAMING)
177 /* Keep constructor when it may be used for folding. We remove
178 references to external variables before final compilation. */
179 else if (DECL_INITIAL (decl) && DECL_INITIAL (decl) != error_mark_node
180 && !ctor_useable_for_folding_p ())
181 remove_initializer ();
182 ggc_free (this);
185 /* Remove node initializer when it is no longer needed. */
186 void
187 varpool_node::remove_initializer (void)
189 if (DECL_INITIAL (decl)
190 && !DECL_IN_CONSTANT_POOL (decl)
191 /* Keep vtables for BINFO folding. */
192 && !DECL_VIRTUAL_P (decl)
193 /* FIXME: http://gcc.gnu.org/PR55395 */
194 && debug_info_level == DINFO_LEVEL_NONE
195 /* When doing declaration merging we have duplicate
196 entries for given decl. Do not attempt to remove
197 the boides, or we will end up remiving
198 wrong one. */
199 && cgraph_state != CGRAPH_LTO_STREAMING)
200 DECL_INITIAL (decl) = error_mark_node;
203 /* Dump given varpool node to F. */
204 void
205 varpool_node::dump (FILE *f)
207 dump_base (f);
208 fprintf (f, " Availability: %s\n",
209 cgraph_function_flags_ready
210 ? cgraph_availability_names[get_availability ()]
211 : "not-ready");
212 fprintf (f, " Varpool flags:");
213 if (DECL_INITIAL (decl))
214 fprintf (f, " initialized");
215 if (output)
216 fprintf (f, " output");
217 if (used_by_single_function)
218 fprintf (f, " used-by-single-function");
219 if (TREE_READONLY (decl))
220 fprintf (f, " read-only");
221 if (ctor_useable_for_folding_p ())
222 fprintf (f, " const-value-known");
223 if (writeonly)
224 fprintf (f, " write-only");
225 if (tls_model)
226 fprintf (f, " %s", tls_model_names [tls_model]);
227 fprintf (f, "\n");
231 /* Dump given varpool node to stderr. */
232 void varpool_node::debug (void)
234 varpool_node::dump (stderr);
237 /* Dump the variable pool to F. */
238 void
239 varpool_node::dump_varpool (FILE *f)
241 varpool_node *node;
243 fprintf (f, "variable pool:\n\n");
244 FOR_EACH_VARIABLE (node)
245 node->dump (f);
248 /* Dump the variable pool to stderr. */
250 DEBUG_FUNCTION void
251 varpool_node::debug_varpool (void)
253 dump_varpool (stderr);
256 /* Given an assembler name, lookup node. */
257 varpool_node *
258 varpool_node::get_for_asmname (tree asmname)
260 if (symtab_node *node = symtab_node_for_asm (asmname))
261 return dyn_cast <varpool_node *> (node);
262 else
263 return NULL;
266 /* When doing LTO, read variable's constructor from disk if
267 it is not already present. */
269 tree
270 varpool_node::get_constructor (void)
272 struct lto_file_decl_data *file_data;
273 const char *data, *name;
274 size_t len;
276 if (DECL_INITIAL (decl) != error_mark_node
277 || !in_lto_p)
278 return DECL_INITIAL (decl);
280 timevar_push (TV_IPA_LTO_CTORS_IN);
282 file_data = lto_file_data;
283 name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
285 /* We may have renamed the declaration, e.g., a static function. */
286 name = lto_get_decl_name_mapping (file_data, name);
288 data = lto_get_section_data (file_data, LTO_section_function_body,
289 name, &len);
290 if (!data)
291 fatal_error ("%s: section %s is missing",
292 file_data->file_name,
293 name);
295 lto_input_variable_constructor (file_data, this, data);
296 lto_stats.num_function_bodies++;
297 lto_free_section_data (file_data, LTO_section_function_body, name,
298 data, len);
299 lto_free_function_in_decl_state_for_node (this);
300 timevar_pop (TV_IPA_LTO_CTORS_IN);
301 return DECL_INITIAL (decl);
304 /* Return true if variable has constructor that can be used for folding. */
306 bool
307 varpool_node::ctor_useable_for_folding_p (void)
309 varpool_node *real_node = this;
311 if (real_node->alias && real_node->definition)
312 real_node = ultimate_alias_target ();
314 if (TREE_CODE (decl) == CONST_DECL
315 || DECL_IN_CONSTANT_POOL (decl))
316 return true;
317 if (TREE_THIS_VOLATILE (decl))
318 return false;
320 /* If we do not have a constructor, we can't use it. */
321 if (DECL_INITIAL (real_node->decl) == error_mark_node
322 && !real_node->lto_file_data)
323 return false;
325 /* Vtables are defined by their types and must match no matter of interposition
326 rules. */
327 if (DECL_VIRTUAL_P (decl))
329 /* The C++ front end creates VAR_DECLs for vtables of typeinfo
330 classes not defined in the current TU so that it can refer
331 to them from typeinfo objects. Avoid returning NULL_TREE. */
332 return DECL_INITIAL (real_node->decl) != NULL;
335 /* Alias of readonly variable is also readonly, since the variable is stored
336 in readonly memory. We also accept readonly aliases of non-readonly
337 locations assuming that user knows what he is asking for. */
338 if (!TREE_READONLY (decl) && !TREE_READONLY (real_node->decl))
339 return false;
341 /* Variables declared 'const' without an initializer
342 have zero as the initializer if they may not be
343 overridden at link or run time.
345 It is actually requirement for C++ compiler to optimize const variables
346 consistently. As a GNU extension, do not enfore this rule for user defined
347 weak variables, so we support interposition on:
348 static const int dummy = 0;
349 extern const int foo __attribute__((__weak__, __alias__("dummy")));
351 if ((!DECL_INITIAL (real_node->decl)
352 || (DECL_WEAK (decl) && !DECL_COMDAT (decl)))
353 && (DECL_EXTERNAL (decl) || decl_replaceable_p (decl)))
354 return false;
356 /* Variables declared `const' with an initializer are considered
357 to not be overwritable with different initializer by default.
359 ??? Previously we behaved so for scalar variables but not for array
360 accesses. */
361 return true;
364 /* If DECLARATION is constant variable and its initial value is known
365 (so we can do constant folding), return its constructor (DECL_INITIAL).
366 This may be an expression or NULL when DECL is initialized to 0.
367 Return ERROR_MARK_NODE otherwise.
369 In LTO this may actually trigger reading the constructor from disk.
370 For this reason varpool_ctor_useable_for_folding_p should be used when
371 the actual constructor value is not needed. */
373 tree
374 ctor_for_folding (tree decl)
376 varpool_node *node, *real_node;
377 tree real_decl;
379 if (TREE_CODE (decl) != VAR_DECL
380 && TREE_CODE (decl) != CONST_DECL)
381 return error_mark_node;
383 if (TREE_CODE (decl) == CONST_DECL
384 || DECL_IN_CONSTANT_POOL (decl))
385 return DECL_INITIAL (decl);
387 if (TREE_THIS_VOLATILE (decl))
388 return error_mark_node;
390 /* Do not care about automatic variables. Those are never initialized
391 anyway, because gimplifier exapnds the code. */
392 if (!TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
394 gcc_assert (!TREE_PUBLIC (decl));
395 return error_mark_node;
398 gcc_assert (TREE_CODE (decl) == VAR_DECL);
400 real_node = node = varpool_node::get (decl);
401 if (node)
403 real_node = node->ultimate_alias_target ();
404 real_decl = real_node->decl;
406 else
407 real_decl = decl;
409 /* See if we are dealing with alias.
410 In most cases alias is just alternative symbol pointing to a given
411 constructor. This allows us to use interposition rules of DECL
412 constructor of REAL_NODE. However weakrefs are special by being just
413 alternative name of their target (if defined). */
414 if (decl != real_decl)
416 gcc_assert (!DECL_INITIAL (decl)
417 || (node->alias && node->get_alias_target () == real_node)
418 || DECL_INITIAL (decl) == error_mark_node);
419 if (node->weakref)
421 node = node->get_alias_target ();
422 decl = node->decl;
426 if ((!DECL_VIRTUAL_P (real_decl)
427 || DECL_INITIAL (real_decl) == error_mark_node
428 || !DECL_INITIAL (real_decl))
429 && (!node || !node->ctor_useable_for_folding_p ()))
430 return error_mark_node;
432 /* OK, we can return constructor. See if we need to fetch it from disk
433 in LTO mode. */
434 if (DECL_INITIAL (real_decl) != error_mark_node
435 || !in_lto_p)
436 return DECL_INITIAL (real_decl);
437 return real_node->get_constructor ();
440 /* Add the variable DECL to the varpool.
441 Unlike varpool_finalize_decl function is intended to be used
442 by middle end and allows insertion of new variable at arbitrary point
443 of compilation. */
444 void
445 varpool_add_new_variable (tree decl)
447 varpool_node *node;
448 varpool_node::finalize_decl (decl);
449 node = varpool_node::get_create (decl);
450 varpool_call_variable_insertion_hooks (node);
451 if (node->externally_visible_p ())
452 node->externally_visible = true;
455 /* Return variable availability. See cgraph.h for description of individual
456 return values. */
457 enum availability
458 varpool_node::get_availability (void)
460 if (!definition)
461 return AVAIL_NOT_AVAILABLE;
462 if (!TREE_PUBLIC (decl))
463 return AVAIL_AVAILABLE;
464 if (DECL_IN_CONSTANT_POOL (decl)
465 || DECL_VIRTUAL_P (decl))
466 return AVAIL_AVAILABLE;
467 if (alias && weakref)
469 enum availability avail;
471 ultimate_alias_target (&avail)->get_availability ();
472 return avail;
474 /* If the variable can be overwritten, return OVERWRITABLE. Takes
475 care of at least one notable extension - the COMDAT variables
476 used to share template instantiations in C++. */
477 if (decl_replaceable_p (decl)
478 || DECL_EXTERNAL (decl))
479 return AVAIL_INTERPOSABLE;
480 return AVAIL_AVAILABLE;
483 void
484 varpool_node::analyze (void)
486 /* When reading back varpool at LTO time, we re-construct the queue in order
487 to have "needed" list right by inserting all needed nodes into varpool.
488 We however don't want to re-analyze already analyzed nodes. */
489 if (!analyzed)
491 gcc_assert (!in_lto_p || cgraph_function_flags_ready);
492 /* Compute the alignment early so function body expanders are
493 already informed about increased alignment. */
494 align_variable (decl, 0);
496 if (alias)
497 resolve_alias (varpool_node::get (alias_target));
498 else if (DECL_INITIAL (decl))
499 record_references_in_initializer (decl, analyzed);
500 analyzed = true;
503 /* Assemble thunks and aliases associated to varpool node. */
505 void
506 varpool_node::assemble_aliases (void)
508 struct ipa_ref *ref;
510 FOR_EACH_ALIAS (this, ref)
512 varpool_node *alias = dyn_cast <varpool_node *> (ref->referring);
513 do_assemble_alias (alias->decl,
514 DECL_ASSEMBLER_NAME (decl));
515 alias->assemble_aliases ();
519 /* Output one variable, if necessary. Return whether we output it. */
521 bool
522 varpool_node::assemble_decl (void)
524 /* Aliases are outout when their target is produced or by
525 output_weakrefs. */
526 if (alias)
527 return false;
529 /* Constant pool is output from RTL land when the reference
530 survive till this level. */
531 if (DECL_IN_CONSTANT_POOL (decl) && TREE_ASM_WRITTEN (decl))
532 return false;
534 /* Decls with VALUE_EXPR should not be in the varpool at all. They
535 are not real variables, but just info for debugging and codegen.
536 Unfortunately at the moment emutls is not updating varpool correctly
537 after turning real vars into value_expr vars. */
538 if (DECL_HAS_VALUE_EXPR_P (decl)
539 && !targetm.have_tls)
540 return false;
542 /* Hard register vars do not need to be output. */
543 if (DECL_HARD_REGISTER (decl))
544 return false;
546 gcc_checking_assert (!TREE_ASM_WRITTEN (decl)
547 && TREE_CODE (decl) == VAR_DECL
548 && !DECL_HAS_VALUE_EXPR_P (decl));
550 if (!in_other_partition
551 && !DECL_EXTERNAL (decl))
553 get_constructor ();
554 assemble_variable (decl, 0, 1, 0);
555 gcc_assert (TREE_ASM_WRITTEN (decl));
556 gcc_assert (definition);
557 assemble_aliases ();
558 return true;
561 return false;
564 /* Add NODE to queue starting at FIRST.
565 The queue is linked via AUX pointers and terminated by pointer to 1. */
567 static void
568 enqueue_node (varpool_node *node, varpool_node **first)
570 if (node->aux)
571 return;
572 gcc_checking_assert (*first);
573 node->aux = *first;
574 *first = node;
577 /* Optimization of function bodies might've rendered some variables as
578 unnecessary so we want to avoid these from being compiled. Re-do
579 reachability starting from variables that are either externally visible
580 or was referred from the asm output routines. */
582 static void
583 varpool_remove_unreferenced_decls (void)
585 varpool_node *next, *node;
586 varpool_node *first = (varpool_node *)(void *)1;
587 int i;
588 struct ipa_ref *ref = NULL;
589 hash_set<varpool_node *> referenced;
591 if (seen_error ())
592 return;
594 if (cgraph_dump_file)
595 fprintf (cgraph_dump_file, "Trivially needed variables:");
596 FOR_EACH_DEFINED_VARIABLE (node)
598 if (node->analyzed
599 && (!node->can_remove_if_no_refs_p ()
600 /* We just expanded all function bodies. See if any of
601 them needed the variable. */
602 || DECL_RTL_SET_P (node->decl)))
604 enqueue_node (node, &first);
605 if (cgraph_dump_file)
606 fprintf (cgraph_dump_file, " %s", node->asm_name ());
609 while (first != (varpool_node *)(void *)1)
611 node = first;
612 first = (varpool_node *)first->aux;
614 if (node->same_comdat_group)
616 symtab_node *next;
617 for (next = node->same_comdat_group;
618 next != node;
619 next = next->same_comdat_group)
621 varpool_node *vnext = dyn_cast <varpool_node *> (next);
622 if (vnext && vnext->analyzed && !next->comdat_local_p ())
623 enqueue_node (vnext, &first);
626 for (i = 0; node->iterate_reference (i, ref); i++)
628 varpool_node *vnode = dyn_cast <varpool_node *> (ref->referred);
629 if (vnode
630 && !vnode->in_other_partition
631 && (!DECL_EXTERNAL (ref->referred->decl)
632 || vnode->alias)
633 && vnode->analyzed)
634 enqueue_node (vnode, &first);
635 else
636 referenced.add (node);
639 if (cgraph_dump_file)
640 fprintf (cgraph_dump_file, "\nRemoving variables:");
641 for (node = varpool_first_defined_variable (); node; node = next)
643 next = varpool_next_defined_variable (node);
644 if (!node->aux)
646 if (cgraph_dump_file)
647 fprintf (cgraph_dump_file, " %s", node->asm_name ());
648 if (referenced.contains (node))
649 node->remove_initializer ();
650 else
651 node->remove ();
655 if (cgraph_dump_file)
656 fprintf (cgraph_dump_file, "\n");
659 /* For variables in named sections make sure get_variable_section
660 is called before we switch to those sections. Then section
661 conflicts between read-only and read-only requiring relocations
662 sections can be resolved. */
663 void
664 varpool_node::finalize_named_section_flags (void)
666 if (!TREE_ASM_WRITTEN (decl)
667 && !alias
668 && !in_other_partition
669 && !DECL_EXTERNAL (decl)
670 && TREE_CODE (decl) == VAR_DECL
671 && !DECL_HAS_VALUE_EXPR_P (decl)
672 && get_section ())
673 get_variable_section (decl, false);
676 /* Output all variables enqueued to be assembled. */
677 bool
678 varpool_node::output_variables (void)
680 bool changed = false;
681 varpool_node *node;
683 if (seen_error ())
684 return false;
686 varpool_remove_unreferenced_decls ();
688 timevar_push (TV_VAROUT);
690 FOR_EACH_DEFINED_VARIABLE (node)
691 node->finalize_named_section_flags ();
693 FOR_EACH_DEFINED_VARIABLE (node)
694 if (node->assemble_decl ())
695 changed = true;
696 timevar_pop (TV_VAROUT);
697 return changed;
700 /* Create a new global variable of type TYPE. */
701 tree
702 add_new_static_var (tree type)
704 tree new_decl;
705 varpool_node *new_node;
707 new_decl = create_tmp_var_raw (type, NULL);
708 DECL_NAME (new_decl) = create_tmp_var_name (NULL);
709 TREE_READONLY (new_decl) = 0;
710 TREE_STATIC (new_decl) = 1;
711 TREE_USED (new_decl) = 1;
712 DECL_CONTEXT (new_decl) = NULL_TREE;
713 DECL_ABSTRACT (new_decl) = 0;
714 lang_hooks.dup_lang_specific_decl (new_decl);
715 new_node = varpool_node::get_create (new_decl);
716 varpool_node::finalize_decl (new_decl);
718 return new_node->decl;
721 /* Attempt to mark ALIAS as an alias to DECL. Return TRUE if successful.
722 Extra name aliases are output whenever DECL is output. */
724 varpool_node *
725 varpool_node::create_alias (tree alias, tree decl)
727 varpool_node *alias_node;
729 gcc_assert (TREE_CODE (decl) == VAR_DECL);
730 gcc_assert (TREE_CODE (alias) == VAR_DECL);
731 alias_node = varpool_node::get_create (alias);
732 alias_node->alias = true;
733 alias_node->definition = true;
734 alias_node->alias_target = decl;
735 if (lookup_attribute ("weakref", DECL_ATTRIBUTES (alias)) != NULL)
736 alias_node->weakref = true;
737 return alias_node;
740 /* Attempt to mark ALIAS as an alias to DECL. Return TRUE if successful.
741 Extra name aliases are output whenever DECL is output. */
743 varpool_node *
744 varpool_node::create_extra_name_alias (tree alias, tree decl)
746 varpool_node *alias_node;
748 #ifndef ASM_OUTPUT_DEF
749 /* If aliases aren't supported by the assembler, fail. */
750 return NULL;
751 #endif
752 alias_node = varpool_node::create_alias (alias, decl);
753 alias_node->cpp_implicit_alias = true;
755 /* Extra name alias mechanizm creates aliases really late
756 via DECL_ASSEMBLER_NAME mechanizm.
757 This is unfortunate because they are not going through the
758 standard channels. Ensure they get output. */
759 if (cpp_implicit_aliases_done)
760 alias_node->resolve_alias (varpool_node::get_create (decl));
761 return alias_node;
764 /* Call calback on varpool symbol and aliases associated to varpool symbol.
765 When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are
766 skipped. */
768 bool
769 varpool_node::call_for_node_and_aliases (bool (*callback) (varpool_node *,
770 void *),
771 void *data,
772 bool include_overwritable)
774 struct ipa_ref *ref;
776 if (callback (this, data))
777 return true;
779 FOR_EACH_ALIAS (this, ref)
781 varpool_node *alias = dyn_cast <varpool_node *> (ref->referring);
782 if (include_overwritable
783 || alias->get_availability () > AVAIL_INTERPOSABLE)
784 if (alias->call_for_node_and_aliases (callback, data,
785 include_overwritable))
786 return true;
788 return false;