diff options
author | Jan Hubicka <jh@suse.cz> | 2006-12-20 10:12:55 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2006-12-20 09:12:55 +0000 |
commit | 0550e7b7aa95d5edd861932b4301a659266f0d0a (patch) | |
tree | 0e45b8b4b49ce6e5845c5262d545083a5facf2b5 /gcc/ipa-inline.c | |
parent | 68e56cc4a27bff0dab7f2fc3bcf8353583771f98 (diff) | |
download | gcc-0550e7b7aa95d5edd861932b4301a659266f0d0a.zip gcc-0550e7b7aa95d5edd861932b4301a659266f0d0a.tar.gz gcc-0550e7b7aa95d5edd861932b4301a659266f0d0a.tar.bz2 |
cgraph.c: Update overall comment; fix vertical spacing.
* cgraph.c: Update overall comment; fix vertical spacing.
* ipa-inline.c (cgraph_decide_inlining): Remove now redundant check.
From-SVN: r120071
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 68 |
1 files changed, 28 insertions, 40 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index feb104f..ec24384 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1041,48 +1041,36 @@ cgraph_decide_inlining (void) && node->local.inlinable && node->callers->inline_failed && !DECL_EXTERNAL (node->decl) && !DECL_COMDAT (node->decl)) { - bool ok = true; - struct cgraph_node *node1; - - /* Verify that we won't duplicate the caller. */ - for (node1 = node->callers->caller; - node1->callers && !node1->callers->inline_failed - && ok; node1 = node1->callers->caller) - if (node1->callers->next_caller || node1->needed) - ok = false; - if (ok) + if (dump_file) + { + 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; + + if (cgraph_check_inline_limits (node->callers->caller, node, + NULL, false)) + { + cgraph_mark_inline (node->callers); + if (dump_file) + fprintf (dump_file, + " Inlined into %s which now has %i insns" + " for a net change of %+i insns.\n", + cgraph_node_name (node->callers->caller), + node->callers->caller->global.insns, + overall_insns - old_insns); + } + else { if (dump_file) - { - 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; - - if (cgraph_check_inline_limits (node->callers->caller, node, - NULL, false)) - { - cgraph_mark_inline (node->callers); - if (dump_file) - fprintf (dump_file, - " Inlined into %s which now has %i insns" - " for a net change of %+i insns.\n", - cgraph_node_name (node->callers->caller), - node->callers->caller->global.insns, - overall_insns - old_insns); - } - else - { - if (dump_file) - fprintf (dump_file, - " Inline limit reached, not inlined.\n"); - } + fprintf (dump_file, + " Inline limit reached, not inlined.\n"); } } } |