Hi, this patch updates inlining functions called once into inlining functions called multiple times when the overall unit size for inlining everywhere shriks. This is now quite possible in the cases where inline predicates catch some DCE as seen in the silly testcase attached. We already caught most of instances of those as part of inlining small functions but in rarer cases where the function is too large we mis the oppurtunity.
Bootstrapped/regtested x86_64-linux, will commit it shortly. Honza * gcc.dg/ipa/inline-6.c: New testcase. * ipa-inline.c (want_inline_function_called_once_p): Rename to ... (want_inline_function_to_all_callers_p): check also functions with multiple callers. (ipa_inline): Handle inlining for size into multiple callers. Index: ipa-inline.c =================================================================== *** ipa-inline.c (revision 192937) --- ipa-inline.c (working copy) *************** check_caller_edge (struct cgraph_node *n *** 681,714 **** } ! /* Decide if NODE is called once inlining it would eliminate need ! for the offline copy of function. */ static bool ! want_inline_function_called_once_p (struct cgraph_node *node) { struct cgraph_node *function = cgraph_function_or_thunk_node (node, NULL); /* Already inlined? */ if (function->global.inlined_to) return false; ! /* Zero or more then one callers? */ ! if (!node->callers ! || node->callers->next_caller) return false; /* Maybe other aliases has more direct calls. */ if (cgraph_for_node_and_aliases (node, check_caller_edge, node->callers, true)) return false; ! /* Recursive call makes no sense to inline. */ ! if (cgraph_edge_recursive_p (node->callers)) ! return false; ! /* External functions are not really in the unit, so inlining ! them when called once would just increase the program size. */ ! if (DECL_EXTERNAL (function->symbol.decl)) ! return false; ! /* Offline body must be optimized out. */ ! if (!cgraph_will_be_removed_from_program_if_no_direct_calls (function)) ! return false; ! if (!can_inline_edge_p (node->callers, true)) return false; return true; } --- 681,721 ---- } ! /* Decide if inlining NODE would reduce unit size by eliminating ! the offline copy of function. ! When COLD is true the cold calls are considered, too. */ static bool ! want_inline_function_to_all_callers_p (struct cgraph_node *node, bool cold) { struct cgraph_node *function = cgraph_function_or_thunk_node (node, NULL); + struct cgraph_edge *e; + bool has_hot_call = false; + + /* Does it have callers? */ + if (!node->callers) + return false; /* Already inlined? */ if (function->global.inlined_to) return false; ! if (cgraph_function_or_thunk_node (node, NULL) != node) ! return false; ! /* Inlining into all callers would increase size? */ ! if (estimate_growth (node) > 0) return false; /* Maybe other aliases has more direct calls. */ if (cgraph_for_node_and_aliases (node, check_caller_edge, node->callers, true)) return false; ! /* All inlines must be possible. */ ! for (e = node->callers; e; e = e->next_caller) ! { ! if (!can_inline_edge_p (e, true)) ! return false; ! if (!has_hot_call && cgraph_maybe_hot_edge_p (e)) ! has_hot_call = 1; ! } ! ! if (!cold && !has_hot_call) return false; return true; } *************** ipa_inline (void) *** 1729,1742 **** symtab_remove_unreachable_nodes (true, dump_file); free (order); ! /* We already perform some inlining of functions called once during ! inlining small functions above. After unreachable nodes are removed, ! we still might do a quick check that nothing new is found. */ if (flag_inline_functions_called_once) { int cold; if (dump_file) ! fprintf (dump_file, "\nDeciding on functions called once:\n"); /* Inlining one function called once has good chance of preventing inlining other function into the same callee. Ideally we should --- 1736,1751 ---- symtab_remove_unreachable_nodes (true, dump_file); free (order); ! /* Inline functions with a property that after inlining into all callers the ! code size will shrink because the out-of-line copy is eliminated. ! We do this regardless on the callee size as long as function growth limits ! are met. */ if (flag_inline_functions_called_once) { int cold; if (dump_file) ! fprintf (dump_file, ! "\nDeciding on functions to be inlined into all callers:\n"); /* Inlining one function called once has good chance of preventing inlining other function into the same callee. Ideally we should *************** ipa_inline (void) *** 1757,1787 **** { FOR_EACH_DEFINED_FUNCTION (node) { ! if (want_inline_function_called_once_p (node) ! && (cold ! || cgraph_maybe_hot_edge_p (node->callers))) ! { ! struct cgraph_node *caller = node->callers->caller; ! if (dump_file) ! { ! fprintf (dump_file, ! "\nInlining %s size %i.\n", ! cgraph_node_name (node), ! inline_summary (node)->size); fprintf (dump_file, ! " Called once from %s %i insns.\n", ! cgraph_node_name (node->callers->caller), ! inline_summary (node->callers->caller)->size); ! } ! ! inline_call (node->callers, true, NULL, NULL, true); ! if (dump_file) ! fprintf (dump_file, ! " Inlined into %s which now has %i size\n", ! cgraph_node_name (caller), ! inline_summary (caller)->size); ! } } } } --- 1766,1795 ---- { FOR_EACH_DEFINED_FUNCTION (node) { ! if (want_inline_function_to_all_callers_p (node, cold)) ! while (node->callers && !node->global.inlined_to) ! { ! struct cgraph_node *caller = node->callers->caller; ! if (dump_file) ! { ! fprintf (dump_file, ! "\nInlining %s size %i.\n", ! cgraph_node_name (node), ! inline_summary (node)->size); ! fprintf (dump_file, ! " Called once from %s %i insns.\n", ! cgraph_node_name (node->callers->caller), ! inline_summary (node->callers->caller)->size); ! } ! ! inline_call (node->callers, true, NULL, NULL, true); ! if (dump_file) fprintf (dump_file, ! " Inlined into %s which now has %i size\n", ! cgraph_node_name (caller), ! inline_summary (caller)->size); ! } } } } Index: testsuite/gcc.dg/ipa/inline-6.c =================================================================== *** testsuite/gcc.dg/ipa/inline-6.c (revision 0) --- testsuite/gcc.dg/ipa/inline-6.c (revision 0) *************** *** 0 **** --- 1,42 ---- + /* Check statements that are eliminated by inlining. */ + /* { dg-do compile } */ + /* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ + static t(int a) + { + if (a==1) + { + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); + } + else if (a==2) + { + bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); + bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); + bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); + bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); + bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); + bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); + } + else + { + bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); + bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); + bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); + bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); + bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); + bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); + } + } + main() + { + t(1); + t(2); + } + /* Even if function is huge, inlining it will save code. */ + /* { dg-final { scan-ipa-dump-times "Inlined" 2 "inline" } } */ + /* { dg-final { cleanup-ipa-dump "inline" } } */