aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-05-04 17:32:42 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2007-05-04 15:32:42 +0000
commit06ea1b848618b585bf335d760a18b31f7ad421b1 (patch)
tree67698d1475067126f61e0e5bc4185c60fd63495b /gcc/ipa-inline.c
parent70aa27669b01c03118b7e18596aafbb0b00f1cf1 (diff)
downloadgcc-06ea1b848618b585bf335d760a18b31f7ad421b1.zip
gcc-06ea1b848618b585bf335d760a18b31f7ad421b1.tar.gz
gcc-06ea1b848618b585bf335d760a18b31f7ad421b1.tar.bz2
opts.c (decode_options): Do not fiddle with inlining parameters in case of optimizing for size.
* 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. Co-Authored-By: Richard Guenther <rguenther@suse.de> From-SVN: r124431
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index 04306aa..076979e 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -668,6 +668,9 @@ cgraph_decide_recursive_inlining (struct cgraph_node *node)
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);
@@ -913,7 +916,7 @@ cgraph_decide_inlining_of_small_functions (void)
}
}
- 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))
@@ -1444,7 +1447,7 @@ cgraph_early_inlining (void)
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);