+2013-05-15 Martin Jambor <mjambor@suse.cz>
+
+ * ipa-prop.c (ipa_print_node_jump_functions): Print symbol order in
+ header, print symbol order instead of node uid, print more information
+ about indirect edge targets.
+ (ipa_make_edge_direct_to_target): Print symbol order instead of node
+ uids.
+ (ipa_make_edge_direct_to_target): Likewise.
+ (remove_described_reference): Likewise.
+ (propagate_controlled_uses): Likewise.
+ (ipa_print_node_params): Also print symbol order.
+ (ipcp_transform_function): Print symbol order instead of node uids.
+ * cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Likewise.
+ (cgraph_get_create_real_symbol_node): Likewise.
+ * ipa-cp.c (print_lattice): Likewise.
+ (print_all_lattices): Likewise.
+ (determine_versionability): Likewise.
+ (initialize_node_lattices): Likewise.
+ (estimate_local_effects): Likewise.
+ (update_profiling_info): Likewise.
+ (create_specialized_node): Likewise.
+ (perhaps_add_new_callers): Likewise.
+ (decide_about_value): Likewise.
+ (decide_whether_version_node): Likewise.
+ (identify_dead_nodes): Likewise.
+ * ipa-inline-analysis.c (dump_inline_edge_summary): Likewise.
+ (dump_inline_summary): Likewise.
+ (estimate_node_size_and_time): Likewise.
+ (inline_analyze_function): Likewise.
+ * ipa-inline.c (report_inline_failed_reason): Likewise.
+ (want_early_inline_function_p): Likewise.
+ (edge_badness): Likewise.
+ (update_edge_key): Likewise.
+ (inline_small_functions): Likewise. Add dumping of order to two other
+ dumps.
+ * ipa-pure-const.c (pure_const_read_summary): Print symbol order
+ instead of node uids.
+ (propagate_pure_const): Likewise.
+ (propagate_pure_const): Likewise.
+ * ipa-utils.c (dump_cgraph_node_set): Likewise.
+ * lto-cgraph.c (input_node): Explicitly specify we dump uid.
+ * lto-symtab.c (lto_cgraph_replace_node): Print symbol order instead
+ of node uids.
+ * tree-pretty-print.c (dump_function_header): Likewise.
+ * tree-sra.c (convert_callers_for_node): Dump in traditional format.
+ Print symbol order instead of node uids.
+
2013-05-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* config/s390/s390.c (s390_register_move_cost): Don't impose the
if (cgraph_dump_file)
{
fprintf (cgraph_dump_file, "updating call of %s/%i -> %s/%i: ",
- xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
- xstrdup (cgraph_node_name (e->callee)), e->callee->uid);
+ xstrdup (cgraph_node_name (e->caller)), e->caller->symbol.order,
+ xstrdup (cgraph_node_name (e->callee)), e->callee->symbol.order);
print_gimple_stmt (cgraph_dump_file, e->call_stmt, 0, dump_flags);
if (e->callee->clone.combined_args_to_skip)
{
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->uid);
+ xstrdup (cgraph_node_name (node)), node->symbol.order);
}
else if (dump_file)
fprintf (dump_file, "Introduced new external node "
- "(%s/%i).\n", xstrdup (cgraph_node_name (node)), node->uid);
+ "(%s/%i).\n", xstrdup (cgraph_node_name (node)),
+ node->symbol.order);
return node;
}
#include "gt-cgraph.h"
fprintf (f, " [from:");
for (s = val->sources; s; s = s->next)
- fprintf (f, " %i(%i)", s->cs->caller->uid,s->cs->frequency);
+ fprintf (f, " %i(%i)", s->cs->caller->symbol.order,
+ s->cs->frequency);
fprintf (f, "]");
}
struct ipa_node_params *info;
info = IPA_NODE_REF (node);
- fprintf (f, " Node: %s/%i:\n", cgraph_node_name (node), node->uid);
+ fprintf (f, " Node: %s/%i:\n", cgraph_node_name (node),
+ node->symbol.order);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
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->uid, reason);
+ cgraph_node_name (node), node->symbol.order, reason);
node->local.versionable = (reason == NULL);
}
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->uid,
+ cgraph_node_name (node), node->symbol.order,
disable ? "BOTTOM" : "VARIABLE");
}
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\nEstimating effects for %s/%i, base_time: %i.\n",
- cgraph_node_name (node), node->uid, base_time);
+ cgraph_node_name (node), node->symbol.order, base_time);
always_const = gather_context_independent_values (info, &known_csts,
&known_binfos, &known_aggs,
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->uid,
+ cgraph_node_name (orig_node), orig_node->symbol.order,
(HOST_WIDE_INT) orig_node_count,
(HOST_WIDE_INT) (orig_sum + new_sum));
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " the new node is %s/%i.\n",
- cgraph_node_name (new_node), new_node->uid);
+ cgraph_node_name (new_node), new_node->symbol.order);
if (aggvals)
ipa_dump_agg_replacement_values (dump_file, aggvals);
}
fprintf (dump_file, " - adding an extra caller %s/%i"
" of %s/%i\n",
xstrdup (cgraph_node_name (cs->caller)),
- cs->caller->uid,
+ cs->caller->symbol.order,
xstrdup (cgraph_node_name (val->spec_node)),
- val->spec_node->uid);
+ val->spec_node->symbol.order);
cgraph_redirect_edge_callee (cs, val->spec_node);
redirected_sum += cs->count;
if (dump_file)
fprintf (dump_file, " Creating a specialized node of %s/%i.\n",
- cgraph_node_name (node), node->uid);
+ cgraph_node_name (node), node->symbol.order);
callers = gather_edges_for_value (val, caller_count);
kv = known_csts.copy ();
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\nEvaluating opportunities for %s/%i.\n",
- cgraph_node_name (node), node->uid);
+ cgraph_node_name (node), node->symbol.order);
gather_context_independent_values (info, &known_csts, &known_binfos,
info->do_clone_for_all_contexts ? &known_aggs
if (dump_file)
fprintf (dump_file, " - Creating a specialized node of %s/%i "
"for all known contexts.\n", cgraph_node_name (node),
- node->uid);
+ node->symbol.order);
callers = collect_callers_of_node (node);
move_binfos_to_values (known_csts, known_binfos);
for (v = node; v ; v = ((struct ipa_dfs_info *) v->symbol.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->uid);
+ cgraph_node_name (v), v->symbol.order);
}
}
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->uid,
+ indent, "", cgraph_node_name (callee), callee->symbol.order,
!edge->inline_failed
? "inlined" : cgraph_inline_failed_string (edge-> inline_failed),
indent, "", es->loop_depth, edge->frequency,
size_time_entry *e;
int i;
fprintf (f, "Inline summary for %s/%i", cgraph_node_name (node),
- node->uid);
+ node->symbol.order);
if (DECL_DISREGARD_INLINE_LIMITS (node->symbol.decl))
fprintf (f, " always_inline");
if (s->inlinable)
{
bool found = false;
fprintf (dump_file, " Estimating body: %s/%i\n"
- " Known to be false: ", cgraph_node_name (node), node->uid);
+ " Known to be false: ", cgraph_node_name (node),
+ node->symbol.order);
for (i = predicate_not_inlined_condition;
i < (predicate_first_dynamic_condition
if (dump_file)
fprintf (dump_file, "\nAnalyzing function: %s/%u\n",
- cgraph_node_name (node), node->uid);
+ cgraph_node_name (node), node->symbol.order);
if (optimize && !node->thunk.thunk_p)
inline_indirect_intraprocedural_analysis (node);
compute_inline_parameters (node, false);
if (dump_file)
{
fprintf (dump_file, " not inlinable: %s/%i -> %s/%i, %s\n",
- xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
- xstrdup (cgraph_node_name (e->callee)), e->callee->uid,
+ xstrdup (cgraph_node_name (e->caller)), e->caller->symbol.order,
+ xstrdup (cgraph_node_name (e->callee)), e->callee->symbol.order,
cgraph_inline_failed_string (e->inline_failed));
}
}
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)), e->caller->uid,
- xstrdup (cgraph_node_name (callee)), callee->uid,
+ xstrdup (cgraph_node_name (e->caller)),
+ e->caller->symbol.order,
+ xstrdup (cgraph_node_name (callee)), callee->symbol.order,
growth);
want_inline = false;
}
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)), e->caller->uid,
- xstrdup (cgraph_node_name (callee)), callee->uid,
+ xstrdup (cgraph_node_name (e->caller)),
+ e->caller->symbol.order,
+ xstrdup (cgraph_node_name (callee)), callee->symbol.order,
growth);
want_inline = false;
}
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)), e->caller->uid,
- xstrdup (cgraph_node_name (callee)), callee->uid,
+ xstrdup (cgraph_node_name (e->caller)),
+ e->caller->symbol.order,
+ xstrdup (cgraph_node_name (callee)), callee->symbol.order,
growth);
want_inline = false;
}
{
fprintf (dump_file, " Badness calculation for %s/%i -> %s/%i\n",
xstrdup (cgraph_node_name (edge->caller)),
- edge->caller->uid,
+ edge->caller->symbol.order,
xstrdup (cgraph_node_name (callee)),
- edge->callee->uid);
+ edge->callee->symbol.order);
fprintf (dump_file, " size growth %i, time %i ",
growth,
edge_time);
fprintf (dump_file,
" decreasing badness %s/%i -> %s/%i, %i to %i\n",
xstrdup (cgraph_node_name (edge->caller)),
- edge->caller->uid,
+ edge->caller->symbol.order,
xstrdup (cgraph_node_name (edge->callee)),
- edge->callee->uid,
+ edge->callee->symbol.order,
(int)n->key,
badness);
}
fprintf (dump_file,
" enqueuing call %s/%i -> %s/%i, badness %i\n",
xstrdup (cgraph_node_name (edge->caller)),
- edge->caller->uid,
+ edge->caller->symbol.order,
xstrdup (cgraph_node_name (edge->callee)),
- edge->callee->uid,
+ edge->callee->symbol.order,
badness);
}
edge->aux = fibheap_insert (heap, badness, edge);
{
if (dump_file)
fprintf (dump_file, "Enqueueing calls of %s/%i.\n",
- cgraph_node_name (node), node->uid);
+ cgraph_node_name (node), node->symbol.order);
for (edge = node->callers; edge; edge = edge->next_caller)
if (edge->inline_failed
if (dump_file)
{
fprintf (dump_file,
- "\nConsidering %s with %i size\n",
- cgraph_node_name (callee),
+ "\nConsidering %s/%i with %i size\n",
+ cgraph_node_name (callee), callee->symbol.order,
inline_summary (callee)->size);
fprintf (dump_file,
- " to be inlined into %s in %s:%i\n"
+ " 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),
+ cgraph_node_name (edge->caller), edge->caller->symbol.order,
flag_wpa ? "unknown"
: gimple_filename ((const_gimple) edge->call_stmt),
flag_wpa ? -1
ipa_print_node_jump_functions (FILE *f, struct cgraph_node *node)
{
struct cgraph_edge *cs;
- int i;
- fprintf (f, " Jump functions of caller %s:\n", cgraph_node_name (node));
+ fprintf (f, " Jump functions of caller %s/%i:\n", cgraph_node_name (node),
+ node->symbol.order);
for (cs = node->callees; cs; cs = cs->next_callee)
{
if (!ipa_edge_args_info_available_for_edge_p (cs))
continue;
fprintf (f, " callsite %s/%i -> %s/%i : \n",
- xstrdup (cgraph_node_name (node)), node->uid,
- xstrdup (cgraph_node_name (cs->callee)), cs->callee->uid);
+ xstrdup (cgraph_node_name (node)), node->symbol.order,
+ xstrdup (cgraph_node_name (cs->callee)),
+ cs->callee->symbol.order);
ipa_print_node_jump_functions_for_edge (f, cs);
}
- for (cs = node->indirect_calls, i = 0; cs; cs = cs->next_callee, i++)
+ for (cs = node->indirect_calls; cs; cs = cs->next_callee)
{
+ struct cgraph_indirect_call_info *ii;
if (!ipa_edge_args_info_available_for_edge_p (cs))
continue;
+ ii = cs->indirect_info;
+ if (ii->agg_contents)
+ fprintf (f, " indirect aggregate callsite, calling param %i, "
+ "offset " HOST_WIDE_INT_PRINT_DEC ", %s",
+ ii->param_index, ii->offset,
+ ii->by_ref ? "by reference" : "by_value");
+ else
+ fprintf (f, " indirect %s callsite, calling param %i",
+ ii->polymorphic ? "polymorphic" : "simple", ii->param_index);
+
if (cs->call_stmt)
{
- fprintf (f, " indirect callsite %d for stmt ", i);
+ fprintf (f, ", for stmt ");
print_gimple_stmt (f, cs->call_stmt, 0, TDF_SLIM);
}
else
- fprintf (f, " indirect callsite %d :\n", i);
+ fprintf (f, "\n");
ipa_print_node_jump_functions_for_edge (f, cs);
-
}
}
{
if (dump_file)
fprintf (dump_file, "ipa-prop: Discovered direct call to non-function"
- " in (%s/%i).\n",
- cgraph_node_name (ie->caller), ie->caller->uid);
+ " in %s/%i.\n",
+ cgraph_node_name (ie->caller), ie->caller->symbol.order);
return NULL;
}
}
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)), ie->caller->uid,
- xstrdup (cgraph_node_name (ie->callee)), ie->callee->uid);
+ xstrdup (cgraph_node_name (ie->caller)),
+ ie->caller->symbol.order,
+ xstrdup (cgraph_node_name (ie->callee)),
+ ie->callee->symbol.order);
return NULL;
}
callee = cgraph_get_create_real_symbol_node (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)), ie->caller->uid,
- xstrdup (cgraph_node_name (ie->callee)), ie->callee->uid);
+ xstrdup (cgraph_node_name (ie->caller)),
+ ie->caller->symbol.order,
+ xstrdup (cgraph_node_name (ie->callee)),
+ ie->callee->symbol.order);
if (ie->call_stmt)
print_gimple_stmt (dump_file, ie->call_stmt, 2, TDF_SLIM);
else
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->uid, xstrdup (symtab_node_name (symbol)));
+ origin->caller->symbol.order, xstrdup (symtab_node_name (symbol)));
}
/* If JFUNC has a reference description with refcount different from
fprintf (dump_file, "ipa-prop: Removing cloning-created "
"reference from %s/%i to %s/%i.\n",
xstrdup (cgraph_node_name (new_root)),
- new_root->uid,
- xstrdup (cgraph_node_name (n)), n->uid);
+ new_root->symbol.order,
+ xstrdup (cgraph_node_name (n)), n->symbol.order);
ipa_remove_reference (ref);
}
}
"cloning-created reference "
"from %s/%i to %s/%i.\n",
xstrdup (cgraph_node_name (clone)),
- clone->uid,
+ clone->symbol.order,
xstrdup (cgraph_node_name (n)),
- n->uid);
+ n->symbol.order);
ipa_remove_reference (ref);
}
clone = clone->callers->caller;
if (!node->analyzed)
return;
info = IPA_NODE_REF (node);
- fprintf (f, " function %s parameter descriptors:\n",
- cgraph_node_name (node));
+ fprintf (f, " function %s/%i parameter descriptors:\n",
+ cgraph_node_name (node), node->symbol.order);
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
{
if (dump_file)
fprintf (dump_file, "Modification phase of node %s/%i\n",
- cgraph_node_name (node), node->uid);
+ cgraph_node_name (node), node->symbol.order);
aggval = ipa_get_agg_replacements_for_node (node);
if (!aggval)
int flags = flags_from_decl_or_type (node->symbol.decl);
fprintf (dump_file, "Read info for %s/%i ",
cgraph_node_name (node),
- node->uid);
+ node->symbol.order);
if (flags & ECF_CONST)
fprintf (dump_file, " const");
if (flags & ECF_PURE)
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " Visiting %s/%i state:%s looping %i\n",
cgraph_node_name (w),
- w->uid,
+ w->symbol.order,
pure_const_names[w_l->pure_const_state],
w_l->looping);
fprintf (dump_file,
" Call to %s/%i",
cgraph_node_name (e->callee),
- e->callee->uid);
+ e->callee->symbol.order);
}
if (avail > AVAIL_OVERWRITABLE)
{
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->uid);
+ fprintf (f, " %s/%i", cgraph_node_name (node), node->symbol.order);
}
fprintf (f, "\n");
}
functions, they are expected to be read more than once. */
if (node->symbol.aux && !DECL_BUILT_IN (node->symbol.decl))
internal_error ("bytecode stream: found multiple instances of cgraph "
- "node %d", node->uid);
+ "node with uid %d", node->uid);
bp = streamer_read_bitpack (ib);
input_overwrite_node (file_data, node, tag, &bp);
{
fprintf (cgraph_dump_file, "Replacing cgraph node %s/%i by %s/%i"
" for symbol %s\n",
- cgraph_node_name (node), node->uid,
+ cgraph_node_name (node), node->symbol.order,
cgraph_node_name (prevailing_node),
- prevailing_node->uid,
+ prevailing_node->symbol.order,
IDENTIFIER_POINTER ((*targetm.asm_out.mangle_assembler_name)
(IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (node->symbol.decl)))));
}
+2013-05-15 Martin Jambor <mjambor@suse.cz>
+
+ * lto-partition.c (lto_balanced_map): Print symbol order instead
+ of node uids.
+
2013-05-15 Jan Hubicka <jh@suse.cz>
PR lto/57038
best_total_size = total_size;
}
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]->uid, partition->insns, cost, internal,
+ 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]->symbol.order,
+ partition->insns, cost, internal,
best_cost, best_internal, best_i);
/* Partition is too large, unwind into step when best cost was reached and
start new partition. */
fprintf (dump_file, ", decl_uid=%d", DECL_UID (fdecl));
if (node)
{
- fprintf (dump_file, ", cgraph_uid=%d)%s\n\n", node->uid,
+ fprintf (dump_file, ", symbol_order=%d)%s\n\n", node->symbol.order,
node->frequency == NODE_FREQUENCY_HOT
? " (hot)"
: node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED
push_cfun (DECL_STRUCT_FUNCTION (cs->caller->symbol.decl));
if (dump_file)
- fprintf (dump_file, "Adjusting call (%i -> %i) %s -> %s\n",
- cs->caller->uid, cs->callee->uid,
+ fprintf (dump_file, "Adjusting call %s/%i -> %s/%i\n",
xstrdup (cgraph_node_name (cs->caller)),
- xstrdup (cgraph_node_name (cs->callee)));
+ cs->caller->symbol.order,
+ xstrdup (cgraph_node_name (cs->callee)),
+ cs->callee->symbol.order);
ipa_modify_call_arguments (cs, cs->call_stmt, *adjustments);