From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerald Pfeifer To: Mark Mitchell Cc: Joe Buck , "gcc@gcc.gnu.org" , Subject: Re: C++ compile-time regressions Date: Thu, 02 Aug 2001 00:20:00 -0000 Message-id: References: X-SW-Source: 2001-08/msg00112.html [ Includes patch. Okay for branch and mainline? ] On Wed, 25 Jul 2001, Gerald Pfeifer wrote: > Yes, I've been working on this now. To be honest, I don't have time to > do this, but I'll try to have something in time for 3.0.1 -- somehow. So, here we go. (The first column is the value of PARAM_MAX_INLINE_INSNS.) -O2 -O3 -O2 -O3 100 8:29 8:48 4000228 3990276 500 8:24 8:53 4136996 4126148 600 8:33 8:59 4158820 4156068 700 8:52 9:32 4169028 4222436 800 8:34? 10:27 4179652 4315396 1000 9:09 11:27 4239076 4425860 1500 9:49 14:05 4336260 4637060 2000 10:47 23:47 4435428 4758052 To me, 600 seems like a definite and affordable improvement here; I'd be a bit hesitant to go over 700. >> Realistically, I think we have to be willing to compromise here; the 3.0.1 >> compiler is going to be slower *and* probably generate slower code than >> 2.95, which is too bad, but that seems to be where we're at. If we could >> get to 10-25% on both figures that would be better than having one figure >> small and the other massive. > The problem is, on both ends of the scale (that is, either slower code > or slower generation) the *better* value is already around 25%, so a > compromise will be worse than that for *both* values. While I still see what I wrote as quoted above as a problem, here is the patch I had promised. I cannot perform regression testing anytime soon, so if this is required, someone else has to do that and install the patch for me. I'll also try to run detailed performance tests, but it's clear from previous results that we will recover at least a bit. Gerald 2001-08-01 Gerald Pfeifer * params.def (PARAM_MAX_INLINE_INSNS): Change default to 600. Correct comment that had been missed in the previous change. Index: params.def =================================================================== RCS file: /cvs/gcc/egcs/gcc/params.def,v retrieving revision 1.3.2.5 diff -u -3 -p -r1.3.2.5 params.def --- params.def 2001/07/26 13:55:02 1.3.2.5 +++ params.def 2001/08/02 05:45:02 @@ -39,12 +39,12 @@ Boston, MA 02111-1307, USA. function. Increasing values mean more agressive inlining. This affects currently only functions explicitly marked as inline (or methods defined within the class definition for C++). - The default value of 10000 is arbitrary but high to match the - previously unlimited gcc capabilities. */ + The original default value of 10000 was arbitrary and caused + significant compile-time performance regressions. */ DEFPARAM (PARAM_MAX_INLINE_INSNS, "max-inline-insns", "The maximum number of instructions in a function that is eligible for inlining", - 100) + 600) /* The maximum number of instructions to consider when looking for an instruction to fill a delay slot. If more than this arbitrary