diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-08 19:31:45 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-12-08 19:31:45 +0000 |
commit | 5ae49d3e56883cf06704ec00ff4c35262dfa7358 (patch) | |
tree | 717a1d74dbcf55ae4d71c2fc03be956c6157212c /gcc/ipa-inline.c | |
parent | 5dc03fafeebbe4215719fffc04d5ec3e0a628b1e (diff) | |
download | gcc-5ae49d3e56883cf06704ec00ff4c35262dfa7358.tar.gz |
PR jit/63854: Introduce xstrdup_for_dump
gcc/ChangeLog:
PR jit/63854
* cgraph.h (xstrdup_for_dump): New function.
* cgraph.c (cgraph_node::get_create): Replace use of xstrdup
within fprintf with xstrdup_for_dump.
(cgraph_edge::make_speculative): Likewise.
(cgraph_edge::resolve_speculation): Likewise.
(cgraph_edge::redirect_call_stmt_to_callee): Likewise.
(cgraph_node::dump): Likewise.
* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
* ipa-cp.c (perhaps_add_new_callers): Likewise.
* ipa-inline.c (report_inline_failed_reason): Likewise.
(want_early_inline_function_p): Likewise.
(edge_badness): Likewise.
(update_edge_key): Likewise.
(flatten_function): Likewise.
(inline_always_inline_functions): Likewise.
* ipa-profile.c (ipa_profile): Likewise.
* ipa-prop.c (ipa_print_node_jump_functions): Likewise.
(ipa_make_edge_direct_to_target): Likewise.
(remove_described_reference): Likewise.
(propagate_controlled_uses): Likewise.
* ipa-utils.c (ipa_merge_profiles): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218490 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 26335ec4b18..f62760fd39c 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -248,8 +248,8 @@ report_inline_failed_reason (struct cgraph_edge *e) if (dump_file) { fprintf (dump_file, " not inlinable: %s/%i -> %s/%i, %s\n", - xstrdup (e->caller->name ()), e->caller->order, - xstrdup (e->callee->name ()), e->callee->order, + xstrdup_for_dump (e->caller->name ()), e->caller->order, + xstrdup_for_dump (e->callee->name ()), e->callee->order, cgraph_inline_failed_string (e->inline_failed)); } } @@ -480,9 +480,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 (e->caller->name ()), + xstrdup_for_dump (e->caller->name ()), e->caller->order, - xstrdup (callee->name ()), callee->order, + xstrdup_for_dump (callee->name ()), callee->order, growth); want_inline = false; } @@ -491,9 +491,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 (e->caller->name ()), + xstrdup_for_dump (e->caller->name ()), e->caller->order, - xstrdup (callee->name ()), callee->order, + xstrdup_for_dump (callee->name ()), callee->order, growth); want_inline = false; } @@ -504,9 +504,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 (e->caller->name ()), + xstrdup_for_dump (e->caller->name ()), e->caller->order, - xstrdup (callee->name ()), callee->order, + xstrdup_for_dump (callee->name ()), callee->order, growth); want_inline = false; } @@ -925,9 +925,9 @@ edge_badness (struct cgraph_edge *edge, bool dump) if (dump) { fprintf (dump_file, " Badness calculation for %s/%i -> %s/%i\n", - xstrdup (edge->caller->name ()), + xstrdup_for_dump (edge->caller->name ()), edge->caller->order, - xstrdup (callee->name ()), + xstrdup_for_dump (callee->name ()), edge->callee->order); fprintf (dump_file, " size growth %i, time %i ", growth, @@ -1094,9 +1094,9 @@ update_edge_key (edge_heap_t *heap, struct cgraph_edge *edge) fprintf (dump_file, " decreasing badness %s/%i -> %s/%i, %"PRId64 " to %"PRId64"\n", - xstrdup (edge->caller->name ()), + xstrdup_for_dump (edge->caller->name ()), edge->caller->order, - xstrdup (edge->callee->name ()), + xstrdup_for_dump (edge->callee->name ()), edge->callee->order, n->get_key ().to_int (), badness.to_int ()); @@ -1111,9 +1111,9 @@ update_edge_key (edge_heap_t *heap, struct cgraph_edge *edge) { fprintf (dump_file, " enqueuing call %s/%i -> %s/%i, badness %"PRId64"\n", - xstrdup (edge->caller->name ()), + xstrdup_for_dump (edge->caller->name ()), edge->caller->order, - xstrdup (edge->callee->name ()), + xstrdup_for_dump (edge->callee->name ()), edge->callee->order, badness.to_int ()); } @@ -1892,8 +1892,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 (callee->name ()), - xstrdup (e->caller->name ())); + xstrdup_for_dump (callee->name ()), + xstrdup_for_dump (e->caller->name ())); e->inline_failed = CIF_RECURSIVE_INLINING; continue; } @@ -1933,8 +1933,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 (callee->name ()), - xstrdup (e->caller->name ())); + xstrdup_for_dump (callee->name ()), + xstrdup_for_dump (e->caller->name ())); orig_callee = callee; inline_call (e, true, NULL, NULL, false); if (e->callee != orig_callee) @@ -2311,8 +2311,8 @@ inline_always_inline_functions (struct cgraph_node *node) if (dump_file) fprintf (dump_file, " Inlining %s into %s (always_inline).\n", - xstrdup (e->callee->name ()), - xstrdup (e->caller->name ())); + xstrdup_for_dump (e->callee->name ()), + xstrdup_for_dump (e->caller->name ())); inline_call (e, true, NULL, NULL, false); inlined = true; } @@ -2363,8 +2363,8 @@ early_inline_small_functions (struct cgraph_node *node) if (dump_file) fprintf (dump_file, " Inlining %s into %s.\n", - xstrdup (callee->name ()), - xstrdup (e->caller->name ())); + xstrdup_for_dump (callee->name ()), + xstrdup_for_dump (e->caller->name ())); inline_call (e, true, NULL, NULL, true); inlined = true; } |