aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2005-11-05 01:54:05 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2005-11-05 00:54:05 +0000
commit50fe876da0e0792b5cf55d7eba7dd30f0efbf1de (patch)
tree69ac33a4aa4b6190f47920b632cf0562471072fb /gcc/ipa-inline.c
parentd6c940434386bd1e675b790db933e5e1f7149e27 (diff)
downloadgcc-50fe876da0e0792b5cf55d7eba7dd30f0efbf1de.zip
gcc-50fe876da0e0792b5cf55d7eba7dd30f0efbf1de.tar.gz
gcc-50fe876da0e0792b5cf55d7eba7dd30f0efbf1de.tar.bz2
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
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c53
1 files changed, 32 insertions, 21 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 00a36c5..9e42dcf 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -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;
}