diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-inline.c | 53 |
2 files changed, 38 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63142ba..50808e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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 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; } |