Lines Matching refs:symbol
21 exclusively by symbol within one comdat group. In this case it makes
22 sense to bring the symbol itself into the group to avoid dead code
44 TODO: When symbol is used only by comdat symbols, but from different groups,
60 the symbol table. All references to SYMBOL are examined
65 propagate_comdat_group (struct symtab_node *symbol,
71 /* Walk all references to SYMBOL, recursively dive into aliases. */
74 symbol->iterate_referring (i, ref)
89 if (symbol->type != symbol2->type)
120 cgraph_node *cnode = dyn_cast <cgraph_node *> (symbol);
156 /* Add all references of SYMBOL that are defined into queue started by FIRST
162 symtab_node *symbol)
167 for (i = 0; symbol->iterate_reference (i, ref); i++)
181 if (cgraph_node *cnode = dyn_cast <cgraph_node *> (symbol))
204 /* Set comdat group of SYMBOL to GROUP.
208 set_comdat_group (symtab_node *symbol,
213 gcc_assert (!symbol->get_comdat_group ());
214 if (symbol->real_symbol_p ())
216 symbol->set_comdat_group (head->get_comdat_group ());
217 symbol->add_to_same_comdat_group (head);
222 /* Set comdat group of SYMBOL to GROUP.
226 set_comdat_group_1 (cgraph_node *symbol,
229 return set_comdat_group (symbol, head_p);
239 symtab_node *symbol;
248 FOR_EACH_DEFINED_SYMBOL (symbol)
249 if (!symbol->real_symbol_p ())
251 else if ((group = symbol->get_comdat_group ()) != NULL)
253 map.put (symbol, group);
254 comdat_head_map.put (group, symbol);
257 /* Mark the symbol so we won't waste time visiting it for dataflow. */
258 symbol->aux = (symtab_node *) (void *) 1;
263 else if (symbol->externally_visible
264 || symbol->force_output
265 || symbol->used_from_other_partition
266 || TREE_THIS_VOLATILE (symbol->decl)
267 || symbol->get_section ()
268 || (TREE_CODE (symbol->decl) == FUNCTION_DECL
269 && (DECL_STATIC_CONSTRUCTOR (symbol->decl)
270 || DECL_STATIC_DESTRUCTOR (symbol->decl))))
272 symtab_node *target = symbol->ultimate_alias_target ();
279 /* Mark the symbol so we won't waste time visiting it for dataflow. */
280 symbol->aux = (symtab_node *) (void *) 1;
284 /* Enqueue symbol for dataflow. */
285 symbol->aux = first;
286 first = symbol;
291 FOR_EACH_DEFINED_SYMBOL (symbol)
292 symbol->aux = NULL;
303 symbol = first;
306 /* Get current lattice value of SYMBOL. */
307 val = map.get (symbol);
312 so we won't re-queue the symbol. */
316 newgroup = propagate_comdat_group (symbol, group, map);
318 /* If nothing changed, proceed to next symbol. */
321 symbol->aux = NULL;
330 map.put (symbol, newgroup);
331 enqueue_references (&first, symbol);
333 /* We may need to revisit the symbol unless it is BOTTOM. */
335 symbol->aux = NULL;
340 FOR_EACH_DEFINED_SYMBOL (symbol)
343 symbol->aux = NULL;
344 if (!symbol->get_comdat_group ()
345 && !symbol->alias
346 && (!(fun = dyn_cast <cgraph_node *> (symbol))
348 && symbol->real_symbol_p ())
350 tree *val = map.get (symbol);
352 /* A NULL here means that SYMBOL is unreachable in the definition
363 fprintf (dump_file, "Localizing symbol\n");
364 symbol->dump (dump_file);
367 if (is_a <cgraph_node *> (symbol))
368 dyn_cast <cgraph_node *>(symbol)->call_for_symbol_thunks_and_aliases
373 symbol->call_for_symbol_and_aliases