diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aea6f594283..3fd3ae1c2a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,18 @@ +2010-11-20 Jan Hubicka + + * cgraph.c (ld_plugin_symbol_resolution_names): New. + (dump_cgraph_node): Dump resolution. + * cgraph.h (ld_plugin_symbol_resolution_names): Declare. + (cgraph_comdat_can_be_unshared_p): Dclare. + * lto-streamer-out.c (produce_symtab): Use + cgraph_comdat_can_be_unshared_p. + * ipa.c (cgraph_address_taken_from_non_vtable_p): New function. + (cgraph_comdat_can_be_unshared_p): New function based on logic + in cgraph_externally_visible_p. + (cgraph_externally_visible_p): Use it. + (varpool_externally_visible_p): Virtual tables can be unshared. + * varpool.c (dump_varpool_node): Dump resolution. + 2010-11-20 Jan Hubicka * stmt.c (lshift_cheap_p): Support properly optimize_insn_for_speed_p. diff --git a/gcc/cgraph.c b/gcc/cgraph.c index fbeb09430b6..36bb87ad928 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -99,6 +99,19 @@ The callgraph: #include "ipa-utils.h" #include "lto-streamer.h" +const char * const ld_plugin_symbol_resolution_names[]= +{ + "", + "undef", + "prevailing_def", + "prevailing_def_ironly", + "preempted_reg", + "preempted_ir", + "resolved_ir", + "resolved_exec", + "resolved_dyn" +}; + static void cgraph_node_remove_callers (struct cgraph_node *node); static inline void cgraph_edge_remove_caller (struct cgraph_edge *e); static inline void cgraph_edge_remove_callee (struct cgraph_edge *e); @@ -1866,6 +1879,9 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node) fprintf (f, " local"); if (node->local.externally_visible) fprintf (f, " externally_visible"); + if (node->resolution != LDPR_UNKNOWN) + fprintf (f, " %s", + ld_plugin_symbol_resolution_names[(int)node->resolution]); if (node->local.finalized) fprintf (f, " finalized"); if (node->local.disregard_inline_limits)