+2007-05-04 Jan Hubicka <jh@suse.cz>
+ Richard Guenther <rguenther@suse.de>
+
+ * opts.c (decode_options): Do not fiddle with inlining
+ parameters in case of optimizing for size.
+ * ipa-inline.c (cgraph_decide_recursive_inlining): When optimizing
+ for size do nothing.
+ (cgraph_decide_inlining_of_small_function): When optimizing for
+ size never inline functions increasing caller size.
+ (cgraph_early_inlining): Inline for size when optimizing for size.
+
2007-04-18 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.md (<optab>di3): Now a define_expand which expands
int depth = 0;
int n = 0;
+ if (optimize_size)
+ return false;
+
if (DECL_DECLARED_INLINE_P (node->decl))
{
limit = PARAM_VALUE (PARAM_MAX_INLINE_INSNS_RECURSIVE);
}
}
- if (!cgraph_maybe_hot_edge_p (edge) && growth > 0)
+ if ((!cgraph_maybe_hot_edge_p (edge) || optimize_size) && growth > 0)
{
if (!cgraph_recursive_inlining_p (edge->caller, edge->callee,
&edge->inline_failed))
if (sorrycount || errorcount)
return 0;
if (cgraph_decide_inlining_incrementally (node,
- flag_unit_at_a_time
+ flag_unit_at_a_time || optimize_size
? INLINE_SIZE : INLINE_SPEED, 0))
{
timevar_push (TV_INTEGRATION);
if (optimize_size)
{
- /* Inlining of very small functions usually reduces total size. */
- set_param_value ("max-inline-insns-single", 5);
- set_param_value ("max-inline-insns-auto", 5);
+ /* Inlining of functions reducing size is a good idea regardless
+ of them being declared inline. */
flag_inline_functions = 1;
/* We want to crossjump as much as possible. */