diff options
author | Martin Jambor <mjambor@suse.cz> | 2013-05-15 12:35:59 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2013-05-15 12:35:59 +0200 |
commit | 9de04252a07c04a9676de3c8606b0a29e66a23ce (patch) | |
tree | 58c9805dc7bf2a381e5910b508a1fe957bbb0de5 /gcc/ipa-prop.c | |
parent | 1dd03b91ccae183b0b313cc0a54953dfc621951a (diff) | |
download | gcc-9de04252a07c04a9676de3c8606b0a29e66a23ce.zip gcc-9de04252a07c04a9676de3c8606b0a29e66a23ce.tar.gz gcc-9de04252a07c04a9676de3c8606b0a29e66a23ce.tar.bz2 |
ipa-prop.c (ipa_print_node_jump_functions): Print symbol order in header...
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.
lto/
* lto-partition.c (lto_balanced_map): Print symbol order instead
of node uids.
From-SVN: r198925
Diffstat (limited to 'gcc/ipa-prop.c')
-rw-r--r-- | gcc/ipa-prop.c | 59 |
1 files changed, 37 insertions, 22 deletions
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index 76b3136..9ae3d69 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -265,34 +265,45 @@ void 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); - } } @@ -2199,8 +2210,8 @@ 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).\n", - cgraph_node_name (ie->caller), ie->caller->uid); + " in %s/%i.\n", + cgraph_node_name (ie->caller), ie->caller->symbol.order); return NULL; } } @@ -2221,8 +2232,10 @@ 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)), 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); @@ -2244,8 +2257,10 @@ 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)), 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 @@ -2298,7 +2313,7 @@ remove_described_reference (symtab_node symbol, struct ipa_cst_ref_desc *rdesc) 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 @@ -2568,8 +2583,8 @@ 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 (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); } } @@ -2608,9 +2623,9 @@ propagate_controlled_uses (struct cgraph_edge *cs) "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; @@ -2957,8 +2972,8 @@ ipa_print_node_params (FILE *f, struct cgraph_node *node) 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++) { @@ -4200,7 +4215,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->uid); + cgraph_node_name (node), node->symbol.order); aggval = ipa_get_agg_replacements_for_node (node); if (!aggval) |