This is the mail archive of the
mailing list for the GCC project.
[RFA] Kill artificial inlining limit
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 13 May 2003 12:06:15 +0200 (CEST)
- Subject: [RFA] Kill artificial inlining limit
In optimization/10679 I report that --param min-inline-insns is not
honoured all the time due to some strange code in tree-inline.c, so
I propose to kill the "doesnt happen in real code" artificial inlining
limit to expose another 30% performance increase in POOMA based scientific
See also thread at http://gcc.gnu.org/ml/gcc/2003-05/msg00654.html
Also Gerald Pfeifer confirmed that the removed codepath does not trigger
in his codebase and such the patch does not make any difference for him.
Patch is against HEAD, but applies to 3.3, too.
Thoughts? I'd apply it in HEAD and see, if people start complaining.
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 188.8.131.52
diff -u -u -r184.108.40.206 tree-inline.c
--- gcc/tree-inline.c 2 May 2003 19:52:01 -0000 220.127.116.11
+++ gcc/tree-inline.c 13 May 2003 09:54:36 -0000
@@ -1007,17 +1007,11 @@
int sum_insns = (id ? id->inlined_stmts : 0) * INSNS_PER_STMT
- /* In the extreme case that we have exceeded the recursive inlining
- limit by a huge factor (128), we just say no. Should not happen
- in real life. */
- if (sum_insns > MAX_INLINE_INSNS * 128)
- inlinable = 0;
- /* If we did not hit the extreme limit, we use a linear function
- 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))
+ /* We use a linear function with slope -1/MAX_INLINE_SLOPE to
+ exceedingly decrease the allowable size.
+ We always allow a size of MIN_INLINE_INSNS though. */
+ if ((sum_insns > MAX_INLINE_INSNS)
+ && (currfn_insns > MIN_INLINE_INSNS))
int max_curr = MAX_INLINE_INSNS_SINGLE
- (sum_insns - MAX_INLINE_INSNS) / MAX_INLINE_SLOPE;