Commit 50fe876d by Jan Hubicka Committed by Jan Hubicka

ipa-inline.c (cgraph_decide_inlining_of_small_function, [...]): Do not hold…

ipa-inline.c (cgraph_decide_inlining_of_small_function, [...]): Do not hold memory returned by cgraph_node_name across other call.

	* ipa-inline.c (cgraph_decide_inlining_of_small_function, 
	cgraph_decide_inlining, cgraph_decide_inlining_incrementally):
	Do not hold memory returned by cgraph_node_name across other call.

From-SVN: r106519
parent d6c94043
2005-11-05 Jan Hubicka <jh@suse.cz>
* ipa-inline.c (cgraph_decide_inlining_of_small_function,
cgraph_decide_inlining, cgraph_decide_inlining_incrementally):
Do not hold memory returned by cgraph_node_name across other call.
2005-11-04 Hans-Peter Nilsson <hp@axis.com>
PR target/23424
......
......@@ -722,11 +722,13 @@ cgraph_decide_inlining_of_small_functions (void)
if (dump_file)
{
fprintf (dump_file,
"\nConsidering %s with %i insns to be inlined into %s\n"
"\nConsidering %s with %i insns\n",
cgraph_node_name (edge->callee),
edge->callee->global.insns);
fprintf (dump_file,
" to be inlined into %s\n"
" Estimated growth after inlined into all callees is %+i insns.\n"
" Estimated badness is %i.\n",
cgraph_node_name (edge->callee),
edge->callee->global.insns,
cgraph_node_name (edge->caller),
cgraph_estimate_growth (edge->callee),
cgraph_edge_badness (edge));
......@@ -827,14 +829,14 @@ cgraph_decide_inlining_of_small_functions (void)
bitmap_clear (updated_nodes);
if (dump_file)
fprintf (dump_file,
" Inlined into %s which now has %i insns.\n",
cgraph_node_name (edge->caller),
edge->caller->global.insns);
if (dump_file)
fprintf (dump_file,
" Inlined for a net change of %+i insns.\n",
overall_insns - old_insns);
{
fprintf (dump_file,
" Inlined into %s which now has %i insns,"
"net change of %+i insns.\n",
cgraph_node_name (edge->caller),
edge->caller->global.insns,
overall_insns - old_insns);
}
}
while ((edge = fibheap_extract_min (heap)) != NULL)
{
......@@ -976,12 +978,15 @@ cgraph_decide_inlining (void)
if (ok)
{
if (dump_file)
fprintf (dump_file,
"\nConsidering %s %i insns.\n"
" Called once from %s %i insns.\n",
cgraph_node_name (node), node->global.insns,
cgraph_node_name (node->callers->caller),
node->callers->caller->global.insns);
{
fprintf (dump_file,
"\nConsidering %s %i insns.\n",
cgraph_node_name (node), node->global.insns);
fprintf (dump_file,
" Called once from %s %i insns.\n",
cgraph_node_name (node->callers->caller),
node->callers->caller->global.insns);
}
old_insns = overall_insns;
......@@ -1038,8 +1043,11 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, bool early)
&& DECL_SAVED_TREE (e->callee->decl))
{
if (dump_file && early)
fprintf (dump_file, " Early inlining %s into %s\n",
cgraph_node_name (e->callee), cgraph_node_name (node));
{
fprintf (dump_file, " Early inlining %s",
cgraph_node_name (e->callee));
fprintf (dump_file, " into %s\n", cgraph_node_name (node));
}
cgraph_mark_inline (e);
inlined = true;
}
......@@ -1060,8 +1068,11 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, bool early)
if (cgraph_default_inline_p (e->callee, &failed_reason))
{
if (dump_file && early)
fprintf (dump_file, " Early inlining %s into %s\n",
cgraph_node_name (e->callee), cgraph_node_name (node));
{
fprintf (dump_file, " Early inlining %s",
cgraph_node_name (e->callee));
fprintf (dump_file, " into %s\n", cgraph_node_name (node));
}
cgraph_mark_inline (e);
inlined = true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment