summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-30 21:34:35 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-30 21:34:35 +0000
commita690dc3233c203ee07fb847f7367173f47e0efd2 (patch)
treece57d487e05cec03c2151c772f2cb79883c72c40 /gcc/ipa-inline.c
parentb3987b8f4d71ebe80092f3e0d50eaac1fedd5141 (diff)
downloadgcc-a690dc3233c203ee07fb847f7367173f47e0efd2.tar.gz
PR middle-end/53136
* ipa-prop.c (ipa_print_node_jump_functions): Wrap multiple calls to cgraph_node_name in xstrdup. (ipa_make_edge_direct_to_target): Ditto. * cgraph.c (dump_cgraph_node): Ditto. * tree-sra.c (convert_callers_for_node): Ditto. * lto-symtab.c (lto_cgraph_replace_node): Ditto. * ipa-cp.c (perhaps_add_new_callers): Ditto. * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Ditto. (cgraph_materialize_all_clones): Ditto. * ipa-inline.c (report_inline_failed_reason): Ditto. (want_early_inline_function_p): Ditto. (edge_badness): Ditto. (update_edge_key): Ditto. (flatten_function): Ditto. (ipa_inline): Ditto. (inlinw_always_inline_functions): Ditto. (early_inline_small_functions): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c51
1 files changed, 28 insertions, 23 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 451bd617603..eb3d42d25d6 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -220,8 +220,8 @@ report_inline_failed_reason (struct cgraph_edge *e)
if (dump_file)
{
fprintf (dump_file, " not inlinable: %s/%i -> %s/%i, %s\n",
- cgraph_node_name (e->caller), e->caller->uid,
- cgraph_node_name (e->callee), e->callee->uid,
+ xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
+ xstrdup (cgraph_node_name (e->callee)), e->callee->uid,
cgraph_inline_failed_string (e->inline_failed));
}
}
@@ -423,8 +423,8 @@ 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",
- cgraph_node_name (e->caller), e->caller->uid,
- cgraph_node_name (callee), callee->uid,
+ xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
+ xstrdup (cgraph_node_name (callee)), callee->uid,
growth);
want_inline = false;
}
@@ -434,8 +434,8 @@ want_early_inline_function_p (struct cgraph_edge *e)
if (dump_file)
fprintf (dump_file, " will not early inline: %s/%i->%s/%i, "
"callee is not leaf and code would grow by %i\n",
- cgraph_node_name (e->caller), e->caller->uid,
- cgraph_node_name (callee), callee->uid,
+ xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
+ xstrdup (cgraph_node_name (callee)), callee->uid,
growth);
want_inline = false;
}
@@ -444,8 +444,8 @@ 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",
- cgraph_node_name (e->caller), e->caller->uid,
- cgraph_node_name (callee), callee->uid,
+ xstrdup (cgraph_node_name (e->caller)), e->caller->uid,
+ xstrdup (cgraph_node_name (callee)), callee->uid,
growth);
want_inline = false;
}
@@ -754,8 +754,8 @@ edge_badness (struct cgraph_edge *edge, bool dump)
if (dump)
{
fprintf (dump_file, " Badness calculation for %s -> %s\n",
- cgraph_node_name (edge->caller),
- cgraph_node_name (callee));
+ xstrdup (cgraph_node_name (edge->caller)),
+ xstrdup (cgraph_node_name (callee)));
fprintf (dump_file, " size growth %i, time growth %i\n",
growth,
time_growth);
@@ -910,8 +910,10 @@ update_edge_key (fibheap_t heap, struct cgraph_edge *edge)
{
fprintf (dump_file,
" decreasing badness %s/%i -> %s/%i, %i to %i\n",
- cgraph_node_name (edge->caller), edge->caller->uid,
- cgraph_node_name (edge->callee), edge->callee->uid,
+ xstrdup (cgraph_node_name (edge->caller)),
+ edge->caller->uid,
+ xstrdup (cgraph_node_name (edge->callee)),
+ edge->callee->uid,
(int)n->key,
badness);
}
@@ -925,8 +927,10 @@ update_edge_key (fibheap_t heap, struct cgraph_edge *edge)
{
fprintf (dump_file,
" enqueuing call %s/%i -> %s/%i, badness %i\n",
- cgraph_node_name (edge->caller), edge->caller->uid,
- cgraph_node_name (edge->callee), edge->callee->uid,
+ xstrdup (cgraph_node_name (edge->caller)),
+ edge->caller->uid,
+ xstrdup (cgraph_node_name (edge->callee)),
+ edge->callee->uid,
badness);
}
edge->aux = fibheap_insert (heap, badness, edge);
@@ -1610,8 +1614,8 @@ flatten_function (struct cgraph_node *node, bool early)
if (dump_file)
fprintf (dump_file,
"Not inlining %s into %s to avoid cycle.\n",
- cgraph_node_name (callee),
- cgraph_node_name (e->caller));
+ xstrdup (cgraph_node_name (callee)),
+ xstrdup (cgraph_node_name (e->caller)));
e->inline_failed = CIF_RECURSIVE_INLINING;
continue;
}
@@ -1651,8 +1655,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",
- cgraph_node_name (callee),
- cgraph_node_name (e->caller));
+ xstrdup (cgraph_node_name (callee)),
+ xstrdup (cgraph_node_name (e->caller)));
orig_callee = callee;
inline_call (e, true, NULL, NULL);
if (e->callee != orig_callee)
@@ -1754,7 +1758,8 @@ ipa_inline (void)
{
fprintf (dump_file,
"\nInlining %s size %i.\n",
- cgraph_node_name (node), inline_summary (node)->size);
+ cgraph_node_name (node),
+ inline_summary (node)->size);
fprintf (dump_file,
" Called once from %s %i insns.\n",
cgraph_node_name (node->callers->caller),
@@ -1817,8 +1822,8 @@ inline_always_inline_functions (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, " Inlining %s into %s (always_inline).\n",
- cgraph_node_name (e->callee),
- cgraph_node_name (e->caller));
+ xstrdup (cgraph_node_name (e->callee)),
+ xstrdup (cgraph_node_name (e->caller)));
inline_call (e, true, NULL, NULL);
inlined = true;
}
@@ -1867,8 +1872,8 @@ early_inline_small_functions (struct cgraph_node *node)
if (dump_file)
fprintf (dump_file, " Inlining %s into %s.\n",
- cgraph_node_name (callee),
- cgraph_node_name (e->caller));
+ xstrdup (cgraph_node_name (callee)),
+ xstrdup (cgraph_node_name (e->caller)));
inline_call (e, true, NULL, NULL);
inlined = true;
}