diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-07-23 16:45:15 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-07-23 16:45:15 +0000 |
commit | 11b8e71cec8c06d103ec4acc344a99c729f3adcd (patch) | |
tree | be02bd6dc05e8e248c3c098b1a3dd523701b322b /gcc/tree-inline.c | |
parent | 1f9d62562662835fbf941f6e86ec0a59d817d955 (diff) | |
download | gcc-11b8e71cec8c06d103ec4acc344a99c729f3adcd.zip gcc-11b8e71cec8c06d103ec4acc344a99c729f3adcd.tar.gz gcc-11b8e71cec8c06d103ec4acc344a99c729f3adcd.tar.bz2 |
re PR rtl-optimization/10679 ([3.3/3.4] --param min-inline-insns not honoured)
PR optimization/10679
* tree-inline.c (inlinable_function_p): Honor MIN_INLINE_INSNS.
PR optimization/10679
* g++.dg/opt/inline4.C: New test.
From-SVN: r69710
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3cfe702..4a468a6 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1005,7 +1005,8 @@ inlinable_function_p (tree fn, inline_data *id, int nolimit) /* In case we don't disregard the inlining limits and we basically can inline this function, investigate further. */ if (! (*lang_hooks.tree_inlining.disregard_inline_limits) (fn) - && inlinable && !nolimit) + && inlinable && !nolimit + && currfn_insns > MIN_INLINE_INSNS) { int sum_insns = (id ? id->inlined_insns : 0) + currfn_insns; /* In the extreme case that we have exceeded the recursive inlining @@ -1017,8 +1018,7 @@ inlinable_function_p (tree fn, inline_data *id, int nolimit) with slope -1/MAX_INLINE_SLOPE to exceedingly decrease the allowable size. We always allow a size of MIN_INLINE_INSNS though. */ - else if ((sum_insns > MAX_INLINE_INSNS) - && (currfn_insns > MIN_INLINE_INSNS)) + else if (sum_insns > MAX_INLINE_INSNS) { int max_curr = MAX_INLINE_INSNS_SINGLE - (sum_insns - MAX_INLINE_INSNS) / MAX_INLINE_SLOPE; |