This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] Kill artificial inlining limit


Hi!

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
applications.

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.

Richard.

Index: gcc/tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.38.2.8
diff -u -u -r1.38.2.8 tree-inline.c
--- gcc/tree-inline.c	2 May 2003 19:52:01 -0000	1.38.2.8
+++ 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
 		     + currfn_insns;
-      /* 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;




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]