--- gcc/cp/optimize.c.orig Thu Jun 7 00:50:22 2001 +++ gcc/cp/optimize.c Wed Aug 22 14:01:16 2001 @@ -641,7 +641,7 @@ else if (varargs_function_p (fn)) ; /* We can't inline functions that are too big. */ - else if (DECL_NUM_STMTS (fn) * INSNS_PER_STMT > MAX_INLINE_INSNS) + else if (DECL_NUM_STMTS (fn) * INSNS_PER_STMT > MAX_INLINE_INSNS / 2) ; /* All is well. We can inline this function. Traditionally, GCC has refused to inline functions using alloca, or functions whose @@ -657,7 +657,8 @@ be that we've done so much inlining already that we don't want to risk inlining any more. */ if ((DECL_NUM_STMTS (fn) + id->inlined_stmts) * INSNS_PER_STMT - > MAX_INLINE_INSNS) + > MAX_INLINE_INSNS + && DECL_NUM_STMTS (fn) * INSNS_PER_STMT > MAX_INLINE_INSNS / 4) inlinable = 0; /* We can inline a template instantiation only if it's fully --- gcc/cp/ChangeLog.orig Mon Aug 20 20:48:06 2001 +++ gcc/cp/ChangeLog Wed Aug 29 14:15:55 2001 @@ -1,3 +1,10 @@ +2001-08-22 Kurt Garloff + + * optimize.c (inlinable_function_p): Change heuristics of inlining: + Rather than allow one single function to exhaust the limit, + allow only half way. Afterwards don't cut abruptly, but half + the allowable size. + 2001-08-19 Release Manager * GCC 3.0.1 Released.