Inline should return failure either (newsize > param_large_function_insns)
OR (newsize > limit). Sometimes newsize is larger than
param_large_function_insns, but smaller than limit, inline doesn't return
failure even if the new function is a large function.
Therefore, param_large_function_insns and param_large_function_growth should be
OR instead of AND, otherwise --param large-function-growth won't
work correctly with --param large-function-insns.
gcc/ChangeLog:
2020-01-07 Luo Xiong Hu <luoxhu@linux.ibm.com>
* ipa-inline-analysis.c (estimate_growth): Fix typo.
* ipa-inline.c (caller_growth_limits): Use OR instead of AND.
From-SVN: r279942
+2020-01-07 Luo Xiong Hu <luoxhu@linux.ibm.com>
+
+ * ipa-inline-analysis.c (estimate_growth): Fix typo.
+ * ipa-inline.c (caller_growth_limits): Use OR instead of AND.
+
2020-01-06 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.c (hard_reg_and_mode_to_addr_mask): New
return 0;
}
-/* Estimate the growth caused by inlining NODE into all callees. */
+/* Estimate the growth caused by inlining NODE into all callers. */
int
estimate_growth (struct cgraph_node *node)
the function to shrink if it went over the limits by forced inlining. */
newsize = estimate_size_after_inlining (to, e);
if (newsize >= ipa_size_summaries->get (what)->size
- && newsize > opt_for_fn (to->decl, param_large_function_insns)
- && newsize > limit)
+ && (newsize > opt_for_fn (to->decl, param_large_function_insns)
+ || newsize > limit))
{
e->inline_failed = CIF_LARGE_FUNCTION_GROWTH_LIMIT;
return false;