remove nolonger needed {cgraph,varpool}_node_{,asm_}name () functions

From-SVN: r204946
This commit is contained in:
Trevor Saunders 2013-11-18 12:18:12 +00:00 committed by Trevor Saunders
parent 1f66e10e20
commit fec39fa6b0
29 changed files with 211 additions and 219 deletions

View File

@ -1,3 +1,15 @@
2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
* cgraph.h (symtab_node_asm_name): Rename to symtab_node::asm_name.
(symtab_node_name): Rename to symtab_node::name.
(cgraph_node_asm_name): Remove.
(varpool_node_asm_name): Remove.
* cgraph.c cgraphclones.c cgraphunit.c ipa-cp.c ipa-devirt.c
ipa-inline-analysis.c ipa-inline-transform.c ipa-inline.c
ipa-profile.c ipa-prop.c ipa-pure-const.c ipa-ref.c ipa-reference.c
ipa-utils.c ipa.c symtab.c tree-inline.c tree-sra.c
tree-ssa-structalias.c value-prof.c varpool.c Adjust.
2013-11-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/aarch-cost-tables.h (cortexa53_extra_costs): New table.

View File

@ -562,11 +562,11 @@ cgraph_get_create_node (tree decl)
if (dump_file)
fprintf (dump_file, "Introduced new external node "
"(%s/%i) and turned into root of the clone tree.\n",
xstrdup (cgraph_node_name (node)), node->order);
xstrdup (node->name ()), node->order);
}
else if (dump_file)
fprintf (dump_file, "Introduced new external node "
"(%s/%i).\n", xstrdup (cgraph_node_name (node)),
"(%s/%i).\n", xstrdup (node->name ()),
node->order);
return node;
}
@ -1097,8 +1097,8 @@ cgraph_turn_edge_to_speculative (struct cgraph_edge *e,
{
fprintf (dump_file, "Indirect call -> speculative call"
" %s/%i => %s/%i\n",
xstrdup (cgraph_node_name (n)), n->order,
xstrdup (cgraph_node_name (n2)), n2->order);
xstrdup (n->name ()), n->order,
xstrdup (n2->name ()), n2->order);
}
e->speculative = true;
e2 = cgraph_create_edge (n, n2, e->call_stmt, direct_count, direct_frequency);
@ -1217,16 +1217,16 @@ cgraph_resolve_speculation (struct cgraph_edge *edge, tree callee_decl)
{
fprintf (dump_file, "Speculative indirect call %s/%i => %s/%i has "
"turned out to have contradicting known target ",
xstrdup (cgraph_node_name (edge->caller)), edge->caller->order,
xstrdup (cgraph_node_name (e2->callee)), e2->callee->order);
xstrdup (edge->caller->name ()), edge->caller->order,
xstrdup (e2->callee->name ()), e2->callee->order);
print_generic_expr (dump_file, callee_decl, 0);
fprintf (dump_file, "\n");
}
else
{
fprintf (dump_file, "Removing speculative call %s/%i => %s/%i\n",
xstrdup (cgraph_node_name (edge->caller)), edge->caller->order,
xstrdup (cgraph_node_name (e2->callee)), e2->callee->order);
xstrdup (edge->caller->name ()), edge->caller->order,
xstrdup (e2->callee->name ()), e2->callee->order);
}
}
}
@ -1342,9 +1342,9 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
if (dump_file)
fprintf (dump_file, "Not expanding speculative call of %s/%i -> %s/%i\n"
"Type mismatch.\n",
xstrdup (cgraph_node_name (e->caller)),
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (cgraph_node_name (e->callee)),
xstrdup (e->callee->name ()),
e->callee->order);
e = cgraph_resolve_speculation (e, NULL);
/* We are producing the final function body and will throw away the
@ -1361,9 +1361,9 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
fprintf (dump_file,
"Expanding speculative call of %s/%i -> %s/%i count:"
HOST_WIDEST_INT_PRINT_DEC"\n",
xstrdup (cgraph_node_name (e->caller)),
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (cgraph_node_name (e->callee)),
xstrdup (e->callee->name ()),
e->callee->order,
(HOST_WIDEST_INT)e->count);
gcc_assert (e2->speculative);
@ -1411,8 +1411,8 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
if (cgraph_dump_file)
{
fprintf (cgraph_dump_file, "updating call of %s/%i -> %s/%i: ",
xstrdup (cgraph_node_name (e->caller)), e->caller->order,
xstrdup (cgraph_node_name (e->callee)), e->callee->order);
xstrdup (e->caller->name ()), e->caller->order,
xstrdup (e->callee->name ()), e->callee->order);
print_gimple_stmt (cgraph_dump_file, e->call_stmt, 0, dump_flags);
if (e->callee->clone.combined_args_to_skip)
{
@ -1891,13 +1891,13 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
if (node->global.inlined_to)
fprintf (f, " Function %s/%i is inline copy in %s/%i\n",
xstrdup (cgraph_node_name (node)),
xstrdup (node->name ()),
node->order,
xstrdup (cgraph_node_name (node->global.inlined_to)),
xstrdup (node->global.inlined_to->name ()),
node->global.inlined_to->order);
if (node->clone_of)
fprintf (f, " Clone of %s/%i\n",
cgraph_node_asm_name (node->clone_of),
node->clone_of->asm_name (),
node->clone_of->order);
if (cgraph_function_flags_ready)
fprintf (f, " Availability: %s\n",
@ -1912,7 +1912,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, " executed "HOST_WIDEST_INT_PRINT_DEC"x",
(HOST_WIDEST_INT)node->count);
if (node->origin)
fprintf (f, " nested in: %s", cgraph_node_asm_name (node->origin));
fprintf (f, " nested in: %s", node->origin->asm_name ());
if (gimple_has_body_p (node->decl))
fprintf (f, " body");
if (node->process)
@ -1958,7 +1958,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
for (edge = node->callers; edge; edge = edge->next_caller)
{
fprintf (f, "%s/%i ", cgraph_node_asm_name (edge->caller),
fprintf (f, "%s/%i ", edge->caller->asm_name (),
edge->caller->order);
if (edge->count)
fprintf (f, "("HOST_WIDEST_INT_PRINT_DEC"x) ",
@ -1979,7 +1979,7 @@ dump_cgraph_node (FILE *f, struct cgraph_node *node)
fprintf (f, "\n Calls: ");
for (edge = node->callees; edge; edge = edge->next_callee)
{
fprintf (f, "%s/%i ", cgraph_node_asm_name (edge->callee),
fprintf (f, "%s/%i ", edge->callee->asm_name (),
edge->callee->order);
if (edge->speculative)
fprintf (f, "(speculative) ");
@ -2599,8 +2599,8 @@ verify_cgraph_node (struct cgraph_node *node)
if (e->aux)
{
error ("aux field set for edge %s->%s",
identifier_to_locale (cgraph_node_name (e->caller)),
identifier_to_locale (cgraph_node_name (e->callee)));
identifier_to_locale (e->caller->name ()),
identifier_to_locale (e->callee->name ()));
error_found = true;
}
if (node->count < 0)
@ -2638,7 +2638,7 @@ verify_cgraph_node (struct cgraph_node *node)
if (e->aux)
{
error ("aux field set for indirect edge from %s",
identifier_to_locale (cgraph_node_name (e->caller)));
identifier_to_locale (e->caller->name ()));
error_found = true;
}
if (!e->indirect_unknown_callee
@ -2646,7 +2646,7 @@ verify_cgraph_node (struct cgraph_node *node)
{
error ("An indirect edge from %s is not marked as indirect or has "
"associated indirect_info, the corresponding statement is: ",
identifier_to_locale (cgraph_node_name (e->caller)));
identifier_to_locale (e->caller->name ()));
cgraph_debug_gimple_stmt (this_cfun, e->call_stmt);
error_found = true;
}
@ -2866,8 +2866,8 @@ verify_cgraph_node (struct cgraph_node *node)
if (!e->aux)
{
error ("edge %s->%s has no corresponding call_stmt",
identifier_to_locale (cgraph_node_name (e->caller)),
identifier_to_locale (cgraph_node_name (e->callee)));
identifier_to_locale (e->caller->name ()),
identifier_to_locale (e->callee->name ()));
cgraph_debug_gimple_stmt (this_cfun, e->call_stmt);
error_found = true;
}
@ -2878,7 +2878,7 @@ verify_cgraph_node (struct cgraph_node *node)
if (!e->aux && !e->speculative)
{
error ("an indirect edge from %s has no corresponding call_stmt",
identifier_to_locale (cgraph_node_name (e->caller)));
identifier_to_locale (e->caller->name ()));
cgraph_debug_gimple_stmt (this_cfun, e->call_stmt);
error_found = true;
}

View File

@ -44,6 +44,12 @@ class GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"),
symtab_node
{
public:
/* Return name. */
const char *name () const;
/* Return asm name. */
const char * asm_name () const;
/* Type of the symbol. */
ENUM_BITFIELD (symtab_type) type : 8;
@ -589,8 +595,6 @@ void symtab_unregister_node (symtab_node *);
void symtab_remove_node (symtab_node *);
symtab_node *symtab_get_node (const_tree);
symtab_node *symtab_node_for_asm (const_tree asmname);
const char * symtab_node_asm_name (symtab_node *);
const char * symtab_node_name (symtab_node *);
void symtab_insert_node_to_hashtable (symtab_node *);
void symtab_add_to_same_comdat_group (symtab_node *, symtab_node *);
void symtab_dissolve_same_comdat_group_list (symtab_node *node);
@ -879,34 +883,6 @@ varpool_get_node (const_tree decl)
return varpool (symtab_get_node (decl));
}
/* Return asm name of cgraph node. */
static inline const char *
cgraph_node_asm_name (struct cgraph_node *node)
{
return symtab_node_asm_name (node);
}
/* Return asm name of varpool node. */
static inline const char *
varpool_node_asm_name (struct varpool_node *node)
{
return symtab_node_asm_name (node);
}
/* Return name of cgraph node. */
static inline const char *
cgraph_node_name (struct cgraph_node *node)
{
return symtab_node_name (node);
}
/* Return name of varpool node. */
static inline const char *
varpool_node_name (struct varpool_node *node)
{
return symtab_node_name (node);
}
/* Walk all symbols. */
#define FOR_EACH_SYMBOL(node) \
for ((node) = symtab_nodes; (node); (node) = (node)->next)

View File

@ -970,8 +970,8 @@ cgraph_materialize_all_clones (void)
if (cgraph_dump_file)
{
fprintf (cgraph_dump_file, "cloning %s to %s\n",
xstrdup (cgraph_node_name (node->clone_of)),
xstrdup (cgraph_node_name (node)));
xstrdup (node->clone_of->name ()),
xstrdup (node->name ()));
if (node->clone.tree_map)
{
unsigned int i;

View File

@ -964,7 +964,7 @@ analyze_functions (void)
fprintf (cgraph_dump_file, "Trivially needed symbols:");
changed = true;
if (cgraph_dump_file)
fprintf (cgraph_dump_file, " %s", symtab_node_asm_name (node));
fprintf (cgraph_dump_file, " %s", node->asm_name ());
if (!changed && cgraph_dump_file)
fprintf (cgraph_dump_file, "\n");
}
@ -1077,7 +1077,7 @@ analyze_functions (void)
if (!node->aux && !referred_to_p (node))
{
if (cgraph_dump_file)
fprintf (cgraph_dump_file, " %s", symtab_node_name (node));
fprintf (cgraph_dump_file, " %s", node->name ());
symtab_remove_node (node);
continue;
}

View File

@ -223,7 +223,7 @@ class CGraphNodePrinter:
def to_string (self):
result = '<cgraph_node* 0x%x' % long(self.gdbval)
if long(self.gdbval):
# symtab_node_name calls lang_hooks.decl_printable_name
# symtab_node::name calls lang_hooks.decl_printable_name
# default implementation (lhd_decl_printable_name) is:
# return IDENTIFIER_POINTER (DECL_NAME (decl));
tree_decl = Tree(self.gdbval['decl'])

View File

@ -381,7 +381,7 @@ print_all_lattices (FILE * f, bool dump_sources, bool dump_benefits)
struct ipa_node_params *info;
info = IPA_NODE_REF (node);
fprintf (f, " Node: %s/%i:\n", cgraph_node_name (node),
fprintf (f, " Node: %s/%i:\n", node->name (),
node->order);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
@ -432,7 +432,7 @@ determine_versionability (struct cgraph_node *node)
if (reason && dump_file && !node->alias && !node->thunk.thunk_p)
fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",
cgraph_node_name (node), node->order, reason);
node->name (), node->order, reason);
node->local.versionable = (reason == NULL);
}
@ -504,7 +504,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; "
"-fipa-cp-clone disabled.\n",
cgraph_node_name (node));
node->name ());
return false;
}
@ -513,7 +513,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; "
"optimizing it for size.\n",
cgraph_node_name (node));
node->name ());
return false;
}
@ -524,7 +524,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
{
if (dump_file)
fprintf (dump_file, "Considering %s for cloning; code might shrink.\n",
cgraph_node_name (node));
node->name ());
return true;
}
@ -538,7 +538,7 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "Considering %s for cloning; "
"usually called directly.\n",
cgraph_node_name (node));
node->name ());
return true;
}
}
@ -546,12 +546,12 @@ ipcp_cloning_candidate_p (struct cgraph_node *node)
{
if (dump_file)
fprintf (dump_file, "Not considering %s for cloning; no hot calls.\n",
cgraph_node_name (node));
node->name ());
return false;
}
if (dump_file)
fprintf (dump_file, "Considering %s for cloning.\n",
cgraph_node_name (node));
node->name ());
return true;
}
@ -712,7 +712,7 @@ initialize_node_lattices (struct cgraph_node *node)
if (dump_file && (dump_flags & TDF_DETAILS)
&& !node->alias && !node->thunk.thunk_p)
fprintf (dump_file, "Marking all lattices of %s/%i as %s\n",
cgraph_node_name (node), node->order,
node->name (), node->order,
disable ? "BOTTOM" : "VARIABLE");
}
@ -1817,7 +1817,7 @@ estimate_local_effects (struct cgraph_node *node)
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\nEstimating effects for %s/%i, base_time: %i.\n",
cgraph_node_name (node), node->order, base_time);
node->name (), node->order, base_time);
always_const = gather_context_independent_values (info, &known_csts,
&known_binfos, &known_aggs,
@ -2506,14 +2506,14 @@ dump_profile_updates (struct cgraph_node *orig_node,
for (cs = new_node->callees; cs ; cs = cs->next_callee)
fprintf (dump_file, " edge to %s has count "
HOST_WIDE_INT_PRINT_DEC "\n",
cgraph_node_name (cs->callee), (HOST_WIDE_INT) cs->count);
cs->callee->name (), (HOST_WIDE_INT) cs->count);
fprintf (dump_file, " setting count of the original node to "
HOST_WIDE_INT_PRINT_DEC "\n", (HOST_WIDE_INT) orig_node->count);
for (cs = orig_node->callees; cs ; cs = cs->next_callee)
fprintf (dump_file, " edge to %s is left with "
HOST_WIDE_INT_PRINT_DEC "\n",
cgraph_node_name (cs->callee), (HOST_WIDE_INT) cs->count);
cs->callee->name (), (HOST_WIDE_INT) cs->count);
}
/* After a specialized NEW_NODE version of ORIG_NODE has been created, update
@ -2544,7 +2544,7 @@ update_profiling_info (struct cgraph_node *orig_node,
fprintf (dump_file, " Problem: node %s/%i has too low count "
HOST_WIDE_INT_PRINT_DEC " while the sum of incoming "
"counts is " HOST_WIDE_INT_PRINT_DEC "\n",
cgraph_node_name (orig_node), orig_node->order,
orig_node->name (), orig_node->order,
(HOST_WIDE_INT) orig_node_count,
(HOST_WIDE_INT) (orig_sum + new_sum));
@ -2683,7 +2683,7 @@ create_specialized_node (struct cgraph_node *node,
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " the new node is %s/%i.\n",
cgraph_node_name (new_node), new_node->order);
new_node->name (), new_node->order);
if (aggvals)
ipa_dump_agg_replacement_values (dump_file, aggvals);
}
@ -3235,9 +3235,9 @@ perhaps_add_new_callers (struct cgraph_node *node, struct ipcp_value *val)
if (dump_file)
fprintf (dump_file, " - adding an extra caller %s/%i"
" of %s/%i\n",
xstrdup (cgraph_node_name (cs->caller)),
xstrdup (cs->caller->name ()),
cs->caller->order,
xstrdup (cgraph_node_name (val->spec_node)),
xstrdup (val->spec_node->name ()),
val->spec_node->order);
cgraph_redirect_edge_callee (cs, val->spec_node);
@ -3342,7 +3342,7 @@ decide_about_value (struct cgraph_node *node, int index, HOST_WIDE_INT offset,
if (dump_file)
fprintf (dump_file, " Creating a specialized node of %s/%i.\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
callers = gather_edges_for_value (val, caller_count);
kv = known_csts.copy ();
@ -3379,7 +3379,7 @@ decide_whether_version_node (struct cgraph_node *node)
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\nEvaluating opportunities for %s/%i.\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
gather_context_independent_values (info, &known_csts, &known_binfos,
info->do_clone_for_all_contexts ? &known_aggs
@ -3422,7 +3422,7 @@ decide_whether_version_node (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, " - Creating a specialized node of %s/%i "
"for all known contexts.\n", cgraph_node_name (node),
"for all known contexts.\n", node->name (),
node->order);
callers = collect_callers_of_node (node);
@ -3514,7 +3514,7 @@ identify_dead_nodes (struct cgraph_node *node)
for (v = node; v ; v = ((struct ipa_dfs_info *) v->aux)->next_cycle)
if (IPA_NODE_REF (v)->node_dead)
fprintf (dump_file, " Marking node as dead: %s/%i.\n",
cgraph_node_name (v), v->order);
v->name (), v->order);
}
}

View File

@ -890,7 +890,7 @@ dump_possible_polymorphic_call_targets (FILE *f,
(int)otr_token,
final ? " (full list)" : " (partial list, may call to other unit)");
for (i = 0; i < targets.length (); i++)
fprintf (f, " %s/%i", cgraph_node_name (targets[i]),
fprintf (f, " %s/%i", targets[i]->name (),
targets[i]->order);
fprintf (f, "\n");
}
@ -988,7 +988,7 @@ ipa_devirt (void)
bool update = false;
if (dump_file && n->indirect_calls)
fprintf (dump_file, "\n\nProcesing function %s/%i\n",
cgraph_node_name (n), n->order);
n->name (), n->order);
for (e = n->indirect_calls; e; e = e->next_callee)
if (e->indirect_info->polymorphic)
{
@ -1101,8 +1101,8 @@ ipa_devirt (void)
if (dump_file)
fprintf (dump_file,
"Speculatively devirtualizing call in %s/%i to %s/%i\n",
cgraph_node_name (n), n->order,
cgraph_node_name (likely_target),
n->name (), n->order,
likely_target->name (),
likely_target->order);
if (!symtab_can_be_discarded (likely_target))
{

View File

@ -1301,7 +1301,7 @@ dump_inline_edge_summary (FILE *f, int indent, struct cgraph_node *node,
fprintf (f,
"%*s%s/%i %s\n%*s loop depth:%2i freq:%4i size:%2i"
" time: %2i callee size:%2i stack:%2i",
indent, "", cgraph_node_name (callee), callee->order,
indent, "", callee->name (), callee->order,
!edge->inline_failed
? "inlined" : cgraph_inline_failed_string (edge-> inline_failed),
indent, "", es->loop_depth, edge->frequency,
@ -1366,7 +1366,7 @@ dump_inline_summary (FILE *f, struct cgraph_node *node)
struct inline_summary *s = inline_summary (node);
size_time_entry *e;
int i;
fprintf (f, "Inline summary for %s/%i", cgraph_node_name (node),
fprintf (f, "Inline summary for %s/%i", node->name (),
node->order);
if (DECL_DISREGARD_INLINE_LIMITS (node->decl))
fprintf (f, " always_inline");
@ -2383,7 +2383,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
if (dump_file)
fprintf (dump_file, "\nAnalyzing function body size: %s\n",
cgraph_node_name (node));
node->name ());
/* When we run into maximal number of entries, we assign everything to the
constant truth case. Be sure to have it in list. */
@ -2990,7 +2990,7 @@ estimate_node_size_and_time (struct cgraph_node *node,
{
bool found = false;
fprintf (dump_file, " Estimating body: %s/%i\n"
" Known to be false: ", cgraph_node_name (node),
" Known to be false: ", node->name (),
node->order);
for (i = predicate_not_inlined_condition;
@ -3772,7 +3772,7 @@ inline_analyze_function (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "\nAnalyzing function: %s/%u\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
if (optimize && !node->thunk.thunk_p)
inline_indirect_intraprocedural_analysis (node);
compute_inline_parameters (node, false);

View File

@ -310,7 +310,7 @@ save_inline_function_body (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "\nSaving body of %s for later reuse\n",
cgraph_node_name (node));
node->name ());
gcc_assert (node == cgraph_get_node (node->decl));

View File

@ -222,8 +222,8 @@ report_inline_failed_reason (struct cgraph_edge *e)
if (dump_file)
{
fprintf (dump_file, " not inlinable: %s/%i -> %s/%i, %s\n",
xstrdup (cgraph_node_name (e->caller)), e->caller->order,
xstrdup (cgraph_node_name (e->callee)), e->callee->order,
xstrdup (e->caller->name ()), e->caller->order,
xstrdup (e->callee->name ()), e->callee->order,
cgraph_inline_failed_string (e->inline_failed));
}
}
@ -434,9 +434,9 @@ want_early_inline_function_p (struct cgraph_edge *e)
if (dump_file)
fprintf (dump_file, " will not early inline: %s/%i->%s/%i, "
"call is cold and code would grow by %i\n",
xstrdup (cgraph_node_name (e->caller)),
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (cgraph_node_name (callee)), callee->order,
xstrdup (callee->name ()), callee->order,
growth);
want_inline = false;
}
@ -445,9 +445,9 @@ want_early_inline_function_p (struct cgraph_edge *e)
if (dump_file)
fprintf (dump_file, " will not early inline: %s/%i->%s/%i, "
"growth %i exceeds --param early-inlining-insns\n",
xstrdup (cgraph_node_name (e->caller)),
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (cgraph_node_name (callee)), callee->order,
xstrdup (callee->name ()), callee->order,
growth);
want_inline = false;
}
@ -458,9 +458,9 @@ want_early_inline_function_p (struct cgraph_edge *e)
fprintf (dump_file, " will not early inline: %s/%i->%s/%i, "
"growth %i exceeds --param early-inlining-insns "
"divided by number of calls\n",
xstrdup (cgraph_node_name (e->caller)),
xstrdup (e->caller->name ()),
e->caller->order,
xstrdup (cgraph_node_name (callee)), callee->order,
xstrdup (callee->name ()), callee->order,
growth);
want_inline = false;
}
@ -870,9 +870,9 @@ edge_badness (struct cgraph_edge *edge, bool dump)
if (dump)
{
fprintf (dump_file, " Badness calculation for %s/%i -> %s/%i\n",
xstrdup (cgraph_node_name (edge->caller)),
xstrdup (edge->caller->name ()),
edge->caller->order,
xstrdup (cgraph_node_name (callee)),
xstrdup (callee->name ()),
edge->callee->order);
fprintf (dump_file, " size growth %i, time %i ",
growth,
@ -1037,9 +1037,9 @@ update_edge_key (fibheap_t heap, struct cgraph_edge *edge)
{
fprintf (dump_file,
" decreasing badness %s/%i -> %s/%i, %i to %i\n",
xstrdup (cgraph_node_name (edge->caller)),
xstrdup (edge->caller->name ()),
edge->caller->order,
xstrdup (cgraph_node_name (edge->callee)),
xstrdup (edge->callee->name ()),
edge->callee->order,
(int)n->key,
badness);
@ -1054,9 +1054,9 @@ update_edge_key (fibheap_t heap, struct cgraph_edge *edge)
{
fprintf (dump_file,
" enqueuing call %s/%i -> %s/%i, badness %i\n",
xstrdup (cgraph_node_name (edge->caller)),
xstrdup (edge->caller->name ()),
edge->caller->order,
xstrdup (cgraph_node_name (edge->callee)),
xstrdup (edge->callee->name ()),
edge->callee->order,
badness);
}
@ -1288,7 +1288,7 @@ recursive_inlining (struct cgraph_edge *edge,
if (dump_file)
fprintf (dump_file,
" Performing recursive inlining on %s\n",
cgraph_node_name (node));
node->name ());
/* Do the inlining and update list of recursive call during process. */
while (!fibheap_empty (heap))
@ -1595,7 +1595,7 @@ inline_small_functions (void)
if (dump_file)
fprintf (dump_file, "Enqueueing calls in %s/%i.\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
for (edge = node->callees; edge; edge = next)
{
@ -1678,13 +1678,13 @@ inline_small_functions (void)
{
fprintf (dump_file,
"\nConsidering %s/%i with %i size\n",
cgraph_node_name (callee), callee->order,
callee->name (), callee->order,
inline_summary (callee)->size);
fprintf (dump_file,
" to be inlined into %s/%i in %s:%i\n"
" Estimated growth after inlined into all is %+i insns.\n"
" Estimated badness is %i, frequency %.2f.\n",
cgraph_node_name (edge->caller), edge->caller->order,
edge->caller->name (), edge->caller->order,
flag_wpa ? "unknown"
: gimple_filename ((const_gimple) edge->call_stmt),
flag_wpa ? -1
@ -1797,7 +1797,7 @@ inline_small_functions (void)
fprintf (dump_file,
" Inlined into %s which now has time %i and size %i,"
"net change of %+i.\n",
cgraph_node_name (edge->caller),
edge->caller->name (),
inline_summary (edge->caller)->time,
inline_summary (edge->caller)->size,
overall_size - old_size);
@ -1848,8 +1848,8 @@ flatten_function (struct cgraph_node *node, bool early)
if (dump_file)
fprintf (dump_file,
"Not inlining %s into %s to avoid cycle.\n",
xstrdup (cgraph_node_name (callee)),
xstrdup (cgraph_node_name (e->caller)));
xstrdup (callee->name ()),
xstrdup (e->caller->name ()));
e->inline_failed = CIF_RECURSIVE_INLINING;
continue;
}
@ -1889,8 +1889,8 @@ flatten_function (struct cgraph_node *node, bool early)
recursing through the original node if the node was cloned. */
if (dump_file)
fprintf (dump_file, " Inlining %s into %s.\n",
xstrdup (cgraph_node_name (callee)),
xstrdup (cgraph_node_name (e->caller)));
xstrdup (callee->name ()),
xstrdup (e->caller->name ()));
orig_callee = callee;
inline_call (e, true, NULL, NULL, false);
if (e->callee != orig_callee)
@ -1935,11 +1935,11 @@ inline_to_all_callers (struct cgraph_node *node, void *data)
{
fprintf (dump_file,
"\nInlining %s size %i.\n",
cgraph_node_name (node),
node->name (),
inline_summary (node)->size);
fprintf (dump_file,
" Called once from %s %i insns.\n",
cgraph_node_name (node->callers->caller),
node->callers->caller->name (),
inline_summary (node->callers->caller)->size);
}
@ -1947,7 +1947,7 @@ inline_to_all_callers (struct cgraph_node *node, void *data)
if (dump_file)
fprintf (dump_file,
" Inlined into %s which now has %i size\n",
cgraph_node_name (caller),
caller->name (),
inline_summary (caller)->size);
if (!(*num_calls)--)
{
@ -2007,7 +2007,7 @@ ipa_inline (void)
{
if (dump_file)
fprintf (dump_file,
"Flattening %s\n", cgraph_node_name (node));
"Flattening %s\n", node->name ());
flatten_function (node, false);
}
}
@ -2115,7 +2115,7 @@ inline_always_inline_functions (struct cgraph_node *node)
{
if (dump_file)
fprintf (dump_file, " Not inlining recursive call to %s.\n",
cgraph_node_name (e->callee));
e->callee->name ());
e->inline_failed = CIF_RECURSIVE_INLINING;
continue;
}
@ -2133,8 +2133,8 @@ inline_always_inline_functions (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, " Inlining %s into %s (always_inline).\n",
xstrdup (cgraph_node_name (e->callee)),
xstrdup (cgraph_node_name (e->caller)));
xstrdup (e->callee->name ()),
xstrdup (e->caller->name ()));
inline_call (e, true, NULL, NULL, false);
inlined = true;
}
@ -2168,7 +2168,7 @@ early_inline_small_functions (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "Considering inline candidate %s.\n",
cgraph_node_name (callee));
callee->name ());
if (!can_early_inline_edge_p (e))
continue;
@ -2185,8 +2185,8 @@ early_inline_small_functions (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, " Inlining %s into %s.\n",
xstrdup (cgraph_node_name (callee)),
xstrdup (cgraph_node_name (e->caller)));
xstrdup (callee->name ()),
xstrdup (e->caller->name ()));
inline_call (e, true, NULL, NULL, true);
inlined = true;
}
@ -2247,7 +2247,7 @@ early_inliner (void)
all calls in it. */
if (dump_file)
fprintf (dump_file,
"Flattening %s\n", cgraph_node_name (node));
"Flattening %s\n", node->name ());
flatten_function (node, true);
inlined = true;
}

View File

@ -351,7 +351,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data)
case NODE_FREQUENCY_EXECUTED_ONCE:
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Called by %s that is executed once\n",
cgraph_node_name (edge->caller));
edge->caller->name ());
d->maybe_unlikely_executed = false;
if (inline_edge_summary (edge)->loop_depth)
{
@ -364,7 +364,7 @@ ipa_propagate_frequency_1 (struct cgraph_node *node, void *data)
case NODE_FREQUENCY_NORMAL:
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Called by %s that is normal or hot\n",
cgraph_node_name (edge->caller));
edge->caller->name ());
d->maybe_unlikely_executed = false;
d->maybe_executed_once = false;
break;
@ -407,7 +407,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
return false;
gcc_assert (node->analyzed);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Processing frequency %s\n", cgraph_node_name (node));
fprintf (dump_file, "Processing frequency %s\n", node->name ());
cgraph_for_node_and_aliases (node, ipa_propagate_frequency_1, &d, true);
@ -417,7 +417,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
node->only_called_at_startup = true;
if (dump_file)
fprintf (dump_file, "Node %s promoted to only called at startup.\n",
cgraph_node_name (node));
node->name ());
changed = true;
}
if ((d.only_called_at_exit && !d.only_called_at_startup)
@ -426,7 +426,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
node->only_called_at_exit = true;
if (dump_file)
fprintf (dump_file, "Node %s promoted to only called at exit.\n",
cgraph_node_name (node));
node->name ());
changed = true;
}
@ -444,7 +444,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
{
if (dump_file)
fprintf (dump_file, "Node %s promoted to hot.\n",
cgraph_node_name (node));
node->name ());
node->frequency = NODE_FREQUENCY_HOT;
return true;
}
@ -454,7 +454,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
{
if (dump_file)
fprintf (dump_file, "Node %s reduced to normal.\n",
cgraph_node_name (node));
node->name ());
node->frequency = NODE_FREQUENCY_NORMAL;
changed = true;
}
@ -468,7 +468,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
node->frequency = NODE_FREQUENCY_UNLIKELY_EXECUTED;
if (dump_file)
fprintf (dump_file, "Node %s promoted to unlikely executed.\n",
cgraph_node_name (node));
node->name ());
changed = true;
}
else if (d.maybe_executed_once && node->frequency != NODE_FREQUENCY_EXECUTED_ONCE)
@ -476,7 +476,7 @@ ipa_propagate_frequency (struct cgraph_node *node)
node->frequency = NODE_FREQUENCY_EXECUTED_ONCE;
if (dump_file)
fprintf (dump_file, "Node %s promoted to executed once.\n",
cgraph_node_name (node));
node->name ());
changed = true;
}
return changed;
@ -590,8 +590,8 @@ ipa_profile (void)
{
fprintf (dump_file, "Indirect call -> direct call from"
" other module %s/%i => %s/%i, prob %3.2f\n",
xstrdup (cgraph_node_name (n)), n->order,
xstrdup (cgraph_node_name (n2)), n2->order,
xstrdup (n->name ()), n->order,
xstrdup (n2->name ()), n2->order,
e->indirect_info->common_target_probability
/ (float)REG_BR_PROB_BASE);
}

View File

@ -318,7 +318,7 @@ ipa_print_node_jump_functions (FILE *f, struct cgraph_node *node)
{
struct cgraph_edge *cs;
fprintf (f, " Jump functions of caller %s/%i:\n", cgraph_node_name (node),
fprintf (f, " Jump functions of caller %s/%i:\n", node->name (),
node->order);
for (cs = node->callees; cs; cs = cs->next_callee)
{
@ -326,8 +326,8 @@ ipa_print_node_jump_functions (FILE *f, struct cgraph_node *node)
continue;
fprintf (f, " callsite %s/%i -> %s/%i : \n",
xstrdup (cgraph_node_name (node)), node->order,
xstrdup (cgraph_node_name (cs->callee)),
xstrdup (node->name ()), node->order,
xstrdup (cs->callee->name ()),
cs->callee->order);
ipa_print_node_jump_functions_for_edge (f, cs);
}
@ -2426,7 +2426,7 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target)
if (dump_file)
fprintf (dump_file, "ipa-prop: Discovered direct call to non-function"
" in %s/%i, making it unreachable.\n",
cgraph_node_name (ie->caller), ie->caller->order);
ie->caller->name (), ie->caller->order);
target = builtin_decl_implicit (BUILT_IN_UNREACHABLE);
callee = cgraph_get_create_node (target);
unreachable = true;
@ -2452,9 +2452,9 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target)
if (dump_file)
fprintf (dump_file, "ipa-prop: Discovered call to a known target "
"(%s/%i -> %s/%i) but can not refer to it. Giving up.\n",
xstrdup (cgraph_node_name (ie->caller)),
xstrdup (ie->caller->name ()),
ie->caller->order,
xstrdup (cgraph_node_name (ie->callee)),
xstrdup (ie->callee->name ()),
ie->callee->order);
return NULL;
}
@ -2471,9 +2471,9 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target)
fprintf (dump_file, "ipa-prop: Discovered %s call to a known target "
"(%s/%i -> %s/%i), for stmt ",
ie->indirect_info->polymorphic ? "a virtual" : "an indirect",
xstrdup (cgraph_node_name (ie->caller)),
xstrdup (ie->caller->name ()),
ie->caller->order,
xstrdup (cgraph_node_name (callee)),
xstrdup (callee->name ()),
callee->order);
if (ie->call_stmt)
print_gimple_stmt (dump_file, ie->call_stmt, 2, TDF_SLIM);
@ -2536,8 +2536,8 @@ remove_described_reference (symtab_node *symbol, struct ipa_cst_ref_desc *rdesc)
ipa_remove_reference (to_del);
if (dump_file)
fprintf (dump_file, "ipa-prop: Removed a reference from %s/%i to %s.\n",
xstrdup (cgraph_node_name (origin->caller)),
origin->caller->order, xstrdup (symtab_node_name (symbol)));
xstrdup (origin->caller->name ()),
origin->caller->order, xstrdup (symbol->name ()));
return true;
}
@ -2867,9 +2867,9 @@ propagate_controlled_uses (struct cgraph_edge *cs)
if (dump_file)
fprintf (dump_file, "ipa-prop: Removing cloning-created "
"reference from %s/%i to %s/%i.\n",
xstrdup (cgraph_node_name (new_root)),
xstrdup (new_root->name ()),
new_root->order,
xstrdup (cgraph_node_name (n)), n->order);
xstrdup (n->name ()), n->order);
ipa_remove_reference (ref);
}
}
@ -2909,9 +2909,9 @@ propagate_controlled_uses (struct cgraph_edge *cs)
fprintf (dump_file, "ipa-prop: Removing "
"cloning-created reference "
"from %s/%i to %s/%i.\n",
xstrdup (cgraph_node_name (clone)),
xstrdup (clone->name ()),
clone->order,
xstrdup (cgraph_node_name (n)),
xstrdup (n->name ()),
n->order);
ipa_remove_reference (ref);
}
@ -3295,7 +3295,7 @@ ipa_print_node_params (FILE *f, struct cgraph_node *node)
return;
info = IPA_NODE_REF (node);
fprintf (f, " function %s/%i parameter descriptors:\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
@ -4553,7 +4553,7 @@ ipcp_transform_function (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, "Modification phase of node %s/%i\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
aggval = ipa_get_agg_replacements_for_node (node);
if (!aggval)

View File

@ -743,7 +743,7 @@ analyze_function (struct cgraph_node *fn, bool ipa)
if (dump_file)
{
fprintf (dump_file, "\n\n local analysis of %s\n ",
cgraph_node_name (fn));
fn->name ());
}
push_cfun (DECL_STRUCT_FUNCTION (decl));
@ -1038,7 +1038,7 @@ pure_const_read_summary (void)
{
int flags = flags_from_decl_or_type (node->decl);
fprintf (dump_file, "Read info for %s/%i ",
cgraph_node_name (node),
node->name (),
node->order);
if (flags & ECF_CONST)
fprintf (dump_file, " const");
@ -1138,7 +1138,7 @@ propagate_pure_const (void)
funct_state w_l = get_function_state (w);
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Visiting %s/%i state:%s looping %i\n",
cgraph_node_name (w),
w->name (),
w->order,
pure_const_names[w_l->pure_const_state],
w_l->looping);
@ -1185,7 +1185,7 @@ propagate_pure_const (void)
{
fprintf (dump_file,
" Call to %s/%i",
cgraph_node_name (e->callee),
e->callee->name (),
e->callee->order);
}
if (avail > AVAIL_OVERWRITABLE)
@ -1331,7 +1331,7 @@ propagate_pure_const (void)
if (dump_file)
fprintf (dump_file, "Function found to be %sconst: %s\n",
this_looping ? "looping " : "",
cgraph_node_name (w));
w->name ());
}
cgraph_set_const_flag (w, true, this_looping);
break;
@ -1343,7 +1343,7 @@ propagate_pure_const (void)
if (dump_file)
fprintf (dump_file, "Function found to be %spure: %s\n",
this_looping ? "looping " : "",
cgraph_node_name (w));
w->name ());
}
cgraph_set_pure_flag (w, true, this_looping);
break;
@ -1446,7 +1446,7 @@ propagate_nothrow (void)
cgraph_set_nothrow_flag (w, true);
if (dump_file)
fprintf (dump_file, "Function found to be nothrow: %s\n",
cgraph_node_name (w));
w->name ());
}
else if (can_throw && !TREE_NOTHROW (w->decl))
w_l->can_throw = true;

View File

@ -154,7 +154,7 @@ ipa_dump_references (FILE * file, struct ipa_ref_list *list)
for (i = 0; ipa_ref_list_reference_iterate (list, i, ref); i++)
{
fprintf (file, "%s/%i (%s)",
symtab_node_asm_name (ref->referred),
ref->referred->asm_name (),
ref->referred->order,
ipa_ref_use_name [ref->use]);
if (ref->speculative)
@ -173,7 +173,7 @@ ipa_dump_referring (FILE * file, struct ipa_ref_list *list)
for (i = 0; ipa_ref_list_referring_iterate (list, i, ref); i++)
{
fprintf (file, "%s/%i (%s)",
symtab_node_asm_name (ref->referring),
ref->referring->asm_name (),
ref->referring->order,
ipa_ref_use_name [ref->use]);
if (ref->speculative)

View File

@ -562,7 +562,7 @@ generate_summary (void)
l = &get_reference_vars_info (node)->local;
fprintf (dump_file,
"\nFunction name:%s/%i:",
cgraph_node_asm_name (node), node->order);
node->asm_name (), node->order);
fprintf (dump_file, "\n locals read: ");
if (l->statics_read)
EXECUTE_IF_SET_IN_BITMAP (l->statics_read,
@ -600,7 +600,7 @@ read_write_all_from_decl (struct cgraph_node *node,
read_all = true;
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " %s/%i -> read all\n",
cgraph_node_asm_name (node), node->order);
node->asm_name (), node->order);
}
else
{
@ -610,7 +610,7 @@ read_write_all_from_decl (struct cgraph_node *node,
write_all = true;
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " %s/%i -> read all, write all\n",
cgraph_node_asm_name (node), node->order);
node->asm_name (), node->order);
}
}
@ -723,7 +723,7 @@ propagate (void)
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Starting cycle with %s/%i\n",
cgraph_node_asm_name (node), node->order);
node->asm_name (), node->order);
vec<cgraph_node_ptr> cycle_nodes = ipa_get_nodes_in_cycle (node);
@ -732,7 +732,7 @@ propagate (void)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Visiting %s/%i\n",
cgraph_node_asm_name (w), w->order);
w->asm_name (), w->order);
get_read_write_all_from_node (w, read_all, write_all);
if (read_all && write_all)
break;
@ -796,7 +796,7 @@ propagate (void)
fprintf (dump_file,
"\nFunction name:%s/%i:",
cgraph_node_asm_name (node), node->order);
node->asm_name (), node->order);
ipa_reference_vars_info_t node_info = get_reference_vars_info (node);
ipa_reference_global_vars_info_t node_g = &node_info->global;
@ -808,7 +808,7 @@ propagate (void)
ipa_reference_local_vars_info_t w_l = &w_ri->local;
if (w != node)
fprintf (dump_file, "\n next cycle: %s/%i ",
cgraph_node_asm_name (w), w->order);
w->asm_name (), w->order);
fprintf (dump_file, "\n locals read: ");
dump_static_vars_set_to_file (dump_file, w_l->statics_read);
fprintf (dump_file, "\n locals written: ");
@ -1086,7 +1086,7 @@ ipa_reference_read_optimization_summary (void)
if (dump_file)
fprintf (dump_file,
"\nFunction name:%s/%i:\n static not read:",
cgraph_node_asm_name (node), node->order);
node->asm_name (), node->order);
/* Set the statics not read. */
v_count = streamer_read_hwi (ib);

View File

@ -481,7 +481,7 @@ dump_cgraph_node_set (FILE *f, cgraph_node_set set)
for (iter = csi_start (set); !csi_end_p (iter); csi_next (&iter))
{
struct cgraph_node *node = csi_node (iter);
fprintf (f, " %s/%i", cgraph_node_name (node), node->order);
fprintf (f, " %s/%i", node->name (), node->order);
}
fprintf (f, "\n");
}
@ -610,7 +610,7 @@ dump_varpool_node_set (FILE *f, varpool_node_set set)
for (iter = vsi_start (set); !vsi_end_p (iter); vsi_next (&iter))
{
struct varpool_node *node = vsi_node (iter);
fprintf (f, " %s", varpool_node_name (node));
fprintf (f, " %s", node->name ());
}
fprintf (f, "\n");
}
@ -657,8 +657,8 @@ ipa_merge_profiles (struct cgraph_node *dst,
if (cgraph_dump_file)
{
fprintf (cgraph_dump_file, "Merging profiles of %s/%i to %s/%i\n",
xstrdup (cgraph_node_name (src)), src->order,
xstrdup (cgraph_node_name (dst)), dst->order);
xstrdup (src->name ()), src->order,
xstrdup (dst->name ()), dst->order);
}
dst->count += src->count;

View File

@ -218,9 +218,9 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
if (dump_file)
fprintf (dump_file,
"Devirtualizing call in %s/%i to %s/%i\n",
cgraph_node_name (edge->caller),
edge->caller->name (),
edge->caller->order,
cgraph_node_name (target), target->order);
target->name (), target->order);
edge = cgraph_make_edge_direct (edge, target);
if (!inline_summary_vec && edge->call_stmt)
cgraph_redirect_edge_call_stmt_to_callee (edge);
@ -451,7 +451,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (!node->aux)
{
if (file)
fprintf (file, " %s", cgraph_node_name (node));
fprintf (file, " %s", node->name ());
cgraph_remove_node (node);
changed = true;
}
@ -465,7 +465,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (node->definition)
{
if (file)
fprintf (file, " %s", cgraph_node_name (node));
fprintf (file, " %s", node->name ());
node->analyzed = false;
node->definition = false;
node->cpp_implicit_alias = false;
@ -511,7 +511,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
&& (!flag_ltrans || !DECL_EXTERNAL (vnode->decl)))
{
if (file)
fprintf (file, " %s", varpool_node_name (vnode));
fprintf (file, " %s", vnode->name ());
varpool_remove_node (vnode);
changed = true;
}
@ -521,7 +521,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (vnode->definition)
{
if (file)
fprintf (file, " %s", varpool_node_name (vnode));
fprintf (file, " %s", vnode->name ());
changed = true;
}
vnode->definition = false;
@ -553,7 +553,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (!cgraph_for_node_and_aliases (node, has_addr_references_p, NULL, true))
{
if (file)
fprintf (file, " %s", cgraph_node_name (node));
fprintf (file, " %s", node->name ());
node->address_taken = false;
changed = true;
if (cgraph_local_node_p (node))
@ -621,7 +621,7 @@ ipa_discover_readonly_nonaddressable_vars (void)
if (TREE_ADDRESSABLE (vnode->decl) && !address_taken)
{
if (dump_file)
fprintf (dump_file, " %s (addressable)", varpool_node_name (vnode));
fprintf (dump_file, " %s (addressable)", vnode->name ());
TREE_ADDRESSABLE (vnode->decl) = 0;
}
if (!TREE_READONLY (vnode->decl) && !address_taken && !written
@ -631,7 +631,7 @@ ipa_discover_readonly_nonaddressable_vars (void)
&& DECL_SECTION_NAME (vnode->decl) == NULL)
{
if (dump_file)
fprintf (dump_file, " %s (read-only)", varpool_node_name (vnode));
fprintf (dump_file, " %s (read-only)", vnode->name ());
TREE_READONLY (vnode->decl) = 1;
}
}
@ -1078,17 +1078,17 @@ function_and_variable_visibility (bool whole_program)
fprintf (dump_file, "\nMarking local functions:");
FOR_EACH_DEFINED_FUNCTION (node)
if (node->local.local)
fprintf (dump_file, " %s", cgraph_node_name (node));
fprintf (dump_file, " %s", node->name ());
fprintf (dump_file, "\n\n");
fprintf (dump_file, "\nMarking externally visible functions:");
FOR_EACH_DEFINED_FUNCTION (node)
if (node->externally_visible)
fprintf (dump_file, " %s", cgraph_node_name (node));
fprintf (dump_file, " %s", node->name ());
fprintf (dump_file, "\n\n");
fprintf (dump_file, "\nMarking externally visible variables:");
FOR_EACH_DEFINED_VARIABLE (vnode)
if (vnode->externally_visible)
fprintf (dump_file, " %s", varpool_node_name (vnode));
fprintf (dump_file, " %s", vnode->name ());
fprintf (dump_file, "\n\n");
}
cgraph_function_flags_ready = true;

View File

@ -1,3 +1,7 @@
2013-11-18 Trevor Saunders <tsaunders@mozilla.com>
* lto-partition.c lto-symtab.c lto.c Adjust.
2013-10-31 David Malcolm <dmalcolm@redhat.com>
Automated part of renaming of symtab_node_base to symtab_node.

View File

@ -197,7 +197,7 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node *node)
node->in_other_partition = 1;
if (cgraph_dump_file)
fprintf (cgraph_dump_file, "Symbol node %s now used in multiple partitions\n",
symtab_node_name (node));
node->name ());
}
node->aux = (void *)((size_t)node->aux + 1);
@ -381,7 +381,7 @@ lto_max_map (void)
if (get_symbol_class (node) != SYMBOL_PARTITION
|| symbol_partitioned_p (node))
continue;
partition = new_partition (symtab_node_asm_name (node));
partition = new_partition (node->asm_name ());
add_symbol_to_partition (partition, node);
npartitions++;
}
@ -688,7 +688,7 @@ lto_balanced_map (void)
if (cgraph_dump_file)
fprintf (cgraph_dump_file, "Step %i: added %s/%i, size %i, cost %i/%i "
"best %i/%i, step %i\n", i,
cgraph_node_name (order[i]), order[i]->order,
order[i]->name (), order[i]->order,
partition->insns, cost, internal,
best_cost, best_internal, best_i);
/* Partition is too large, unwind into step when best cost was reached and
@ -824,7 +824,7 @@ promote_symbol (symtab_node *node)
DECL_VISIBILITY_SPECIFIED (node->decl) = true;
if (cgraph_dump_file)
fprintf (cgraph_dump_file,
"Promoting as hidden: %s\n", symtab_node_name (node));
"Promoting as hidden: %s\n", node->name ());
}
/* Return true if NODE needs named section even if it won't land in the partition
@ -885,7 +885,7 @@ rename_statics (lto_symtab_encoder_t encoder, symtab_node *node)
if (cgraph_dump_file)
fprintf (cgraph_dump_file,
"Renaming statics with asm name: %s\n", symtab_node_name (node));
"Renaming statics with asm name: %s\n", node->name ());
/* Assign every symbol in the set that shares the same ASM name an unique
mangled name. */

View File

@ -45,8 +45,8 @@ lto_cgraph_replace_node (struct cgraph_node *node,
{
fprintf (cgraph_dump_file, "Replacing cgraph node %s/%i by %s/%i"
" for symbol %s\n",
cgraph_node_name (node), node->order,
cgraph_node_name (prevailing_node),
node->name (), node->order,
prevailing_node->name (),
prevailing_node->order,
IDENTIFIER_POINTER ((*targetm.asm_out.mangle_assembler_name)
(IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl)))));
@ -428,7 +428,7 @@ lto_symtab_merge_decls_1 (symtab_node *first)
if (cgraph_dump_file)
{
fprintf (cgraph_dump_file, "Merging nodes for %s. Candidates:\n",
symtab_node_asm_name (first));
first->asm_name ());
for (e = first; e; e = e->next_sharing_asm_name)
if (TREE_PUBLIC (e->decl))
dump_symtab_node (cgraph_dump_file, e);

View File

@ -2480,7 +2480,7 @@ lto_wpa_write_files (void)
lsei_next_in_partition (&lsei))
{
symtab_node *node = lsei_node (lsei);
fprintf (cgraph_dump_file, "%s ", symtab_node_asm_name (node));
fprintf (cgraph_dump_file, "%s ", node->asm_name ());
}
fprintf (cgraph_dump_file, "\n Symbols in boundary: ");
for (lsei = lsei_start (part->encoder); !lsei_end_p (lsei);
@ -2489,7 +2489,7 @@ lto_wpa_write_files (void)
symtab_node *node = lsei_node (lsei);
if (!lto_symtab_encoder_in_partition_p (part->encoder, node))
{
fprintf (cgraph_dump_file, "%s ", symtab_node_asm_name (node));
fprintf (cgraph_dump_file, "%s ", node->asm_name ());
cgraph_node *cnode = dyn_cast <cgraph_node> (node);
if (cnode
&& lto_symtab_encoder_encode_body_p (part->encoder, cnode))

View File

@ -2782,7 +2782,7 @@ drop_profile (struct cgraph_node *node, gcov_type call_count)
if (dump_file)
fprintf (dump_file,
"Dropping 0 profile for %s/%i. %s based on calls.\n",
cgraph_node_name (node), node->order,
node->name (), node->order,
hot ? "Function is hot" : "Function is normal");
/* We only expect to miss profiles for functions that are reached
via non-zero call edges in cases where the function may have
@ -2800,11 +2800,11 @@ drop_profile (struct cgraph_node *node, gcov_type call_count)
if (dump_file)
fprintf (dump_file,
"Missing counts for called function %s/%i\n",
cgraph_node_name (node), node->order);
node->name (), node->order);
}
else
warning (0, "Missing counts for called function %s/%i",
cgraph_node_name (node), node->order);
node->name (), node->order);
}
profile_status_for_function (fn)

View File

@ -540,19 +540,19 @@ symtab_dissolve_same_comdat_group_list (symtab_node *node)
is unknown go with identifier name. */
const char *
symtab_node_asm_name (symtab_node *node)
symtab_node::asm_name () const
{
if (!DECL_ASSEMBLER_NAME_SET_P (node->decl))
return lang_hooks.decl_printable_name (node->decl, 2);
return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->decl));
if (!DECL_ASSEMBLER_NAME_SET_P (decl))
return lang_hooks.decl_printable_name (decl, 2);
return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
}
/* Return printable identifier name. */
const char *
symtab_node_name (symtab_node *node)
symtab_node::name () const
{
return lang_hooks.decl_printable_name (node->decl, 2);
return lang_hooks.decl_printable_name (decl, 2);
}
static const char * const symtab_type_names[] = {"symbol", "function", "variable"};
@ -567,9 +567,9 @@ dump_symtab_base (FILE *f, symtab_node *node)
};
fprintf (f, "%s/%i (%s)",
symtab_node_asm_name (node),
node->asm_name (),
node->order,
symtab_node_name (node));
node->name ());
dump_addr (f, " @", (void *)node);
fprintf (f, "\n Type: %s", symtab_type_names[node->type]);
@ -645,7 +645,7 @@ dump_symtab_base (FILE *f, symtab_node *node)
if (node->same_comdat_group)
fprintf (f, " Same comdat group as: %s/%i\n",
symtab_node_asm_name (node->same_comdat_group),
node->same_comdat_group->asm_name (),
node->same_comdat_group->order);
if (node->next_sharing_asm_name)
fprintf (f, " next sharing asm name: %i\n",

View File

@ -1851,7 +1851,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
if (dump_file)
{
fprintf (dump_file, "Created new direct edge to %s\n",
cgraph_node_name (dest));
dest->name ());
}
}

View File

@ -4846,9 +4846,9 @@ convert_callers_for_node (struct cgraph_node *node,
if (dump_file)
fprintf (dump_file, "Adjusting call %s/%i -> %s/%i\n",
xstrdup (cgraph_node_name (cs->caller)),
xstrdup (cs->caller->name ()),
cs->caller->order,
xstrdup (cgraph_node_name (cs->callee)),
xstrdup (cs->callee->name ()),
cs->callee->order);
ipa_modify_call_arguments (cs, cs->call_stmt, *adjustments);

View File

@ -7158,7 +7158,7 @@ ipa_pta_execute (void)
if (dump_file)
{
fprintf (dump_file,
"Generating constraints for %s", cgraph_node_name (node));
"Generating constraints for %s", node->name ());
if (DECL_ASSEMBLER_NAME_SET_P (node->decl))
fprintf (dump_file, " (%s)",
IDENTIFIER_POINTER

View File

@ -1224,9 +1224,9 @@ init_node_map (bool local)
fprintf (dump_file, "Local profile-id %i conflict"
" with nodes %s/%i %s/%i\n",
n->profile_id,
cgraph_node_name (n),
n->name (),
n->order,
symtab_node_name (*(symtab_node **)val),
(*(symtab_node **)val)->name (),
(*(symtab_node **)val)->order);
n->profile_id = (n->profile_id + 1) & 0x7fffffff;
}
@ -1237,7 +1237,7 @@ init_node_map (bool local)
fprintf (dump_file,
"Node %s/%i has no profile-id"
" (profile feedback missing?)\n",
cgraph_node_name (n),
n->name (),
n->order);
continue;
}
@ -1248,7 +1248,7 @@ init_node_map (bool local)
fprintf (dump_file,
"Node %s/%i has IP profile-id %i conflict. "
"Giving up.\n",
cgraph_node_name (n),
n->name (),
n->order,
n->profile_id);
*val = NULL;
@ -1297,7 +1297,7 @@ check_ic_target (gimple call_stmt, struct cgraph_node *target)
if (dump_enabled_p ())
dump_printf_loc (MSG_MISSED_OPTIMIZATION, locus,
"Skipping target %s with mismatching types for icall\n",
cgraph_node_name (target));
target->name ());
return false;
}

View File

@ -502,7 +502,7 @@ varpool_remove_unreferenced_decls (void)
{
enqueue_node (node, &first);
if (cgraph_dump_file)
fprintf (cgraph_dump_file, " %s", varpool_node_asm_name (node));
fprintf (cgraph_dump_file, " %s", node->asm_name ());
}
}
while (first != (struct varpool_node *)(void *)1)
@ -540,7 +540,7 @@ varpool_remove_unreferenced_decls (void)
if (!node->aux)
{
if (cgraph_dump_file)
fprintf (cgraph_dump_file, " %s", varpool_node_asm_name (node));
fprintf (cgraph_dump_file, " %s", node->asm_name ());
varpool_remove_node (node);
}
}