This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Different code with default and -finline-limit=600 (fwd)
- From: Jan Hubicka <jh at suse dot cz>
- To: Gerald Pfeifer <gerald at pfeifer dot com>, gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <jh at suse dot cz>
- Date: Sat, 1 Nov 2003 16:52:50 +0100
- Subject: Re: Different code with default and -finline-limit=600 (fwd)
- References: <Pine.BSF.4.58.0311010026440.9208@acrux.dbai.tuwien.ac.at> <20031101011048.GH12532@kam.mff.cuni.cz> <Pine.BSF.4.58.0311011451020.13382@acrux.dbai.tuwien.ac.at>
> On Sat, 1 Nov 2003, Jan Hubicka wrote:
> > Hmm, right. -finline-limit has effect of setting all the other
> > parameters to the specified value, so it has not default value as we now
> > set each argument differently.
> >
> > Perhaps we should simply mark it as obsoletted by the other arguments
> > and not specify any default at all?
>
> Yes, that makes sense. Perhaps you could also ask the one who reported
> the problem about his preferences?
OK lets try it.
So far here is patch to kill obivously incorrect claim about default
value.
I also noticed that we do have dead parameter max-inline-insns and some
other glitches. OK?
2003-11-01 Jan Hubicka <jh@suse.cz>
* opts.c (common_handle_option): Do not set max-inline-insns
* params.def: Update comments
(MAX_INLINE_INSNS): Kill.
* invoke.texi (max-inline-insns): Kill.
(-finline-insns): Correct documentation.
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.44
diff -c -3 -p -r1.44 opts.c
*** opts.c 20 Oct 2003 21:46:33 -0000 1.44
--- opts.c 1 Nov 2003 15:49:04 -0000
*************** common_handle_option (size_t scode, cons
*** 1057,1063 ****
case OPT_finline_limit_:
case OPT_finline_limit_eq:
- set_param_value ("max-inline-insns", value);
set_param_value ("max-inline-insns-single", value / 2);
set_param_value ("max-inline-insns-auto", value / 2);
set_param_value ("max-inline-insns-rtl", value);
--- 1058,1063 ----
Index: params.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/params.def,v
retrieving revision 1.30
diff -c -3 -p -r1.30 params.def
*** params.def 20 Oct 2003 21:46:33 -0000 1.30
--- params.def 1 Nov 2003 15:49:04 -0000
*************** Software Foundation, 59 Temple Place - S
*** 39,45 ****
of a function counted in internal gcc instructions (not in
real machine instructions) that is eligible for inlining
by the tree inliner.
! The default value is 100.
Only functions marked inline (or methods defined in the class
definition for C++) are affected by this, unless you set the
-finline-functions (included in -O3) compiler option.
--- 39,45 ----
of a function counted in internal gcc instructions (not in
real machine instructions) that is eligible for inlining
by the tree inliner.
! The default value is 500.
Only functions marked inline (or methods defined in the class
definition for C++) are affected by this, unless you set the
-finline-functions (included in -O3) compiler option.
*************** DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
*** 59,88 ****
that is applied to functions marked inlined (or defined in the
class declaration in C++) given by the "max-inline-insns-single"
parameter.
! The default value is 100. */
DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
"max-inline-insns-auto",
"The maximum number of instructions when automatically inlining",
150)
-
- /* The repeated inlining limit. After this number of instructions
- (in the internal gcc representation, not real machine instructions)
- got inlined by repeated inlining, gcc starts to decrease the maximum
- number of inlinable instructions in the tree inliner.
- This is done by a linear function, see "max-inline-slope" parameter.
- It is necessary in order to limit the compile-time resources, that
- could otherwise become very high.
- It is recommended to set this value to twice the value of the single
- function limit (set by the "max-inline-insns-single" parameter) or
- higher. The default value is 200.
- Higher values mean that more inlining is done, resulting in
- better performance of the code, at the expense of higher
- compile-time resource (time, memory) requirements and larger
- binaries. */
- DEFPARAM (PARAM_MAX_INLINE_INSNS,
- "max-inline-insns",
- "The maximum number of instructions by repeated inlining before gcc starts to throttle inlining",
- 200)
/* For languages that (still) use the RTL inliner, we can specify
limits for the RTL inliner separately.
--- 59,69 ----
that is applied to functions marked inlined (or defined in the
class declaration in C++) given by the "max-inline-insns-single"
parameter.
! The default value is 150. */
DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
"max-inline-insns-auto",
"The maximum number of instructions when automatically inlining",
150)
/* For languages that (still) use the RTL inliner, we can specify
limits for the RTL inliner separately.
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.356
diff -c -3 -p -r1.356 invoke.texi
*** doc/invoke.texi 26 Oct 2003 19:03:43 -0000 1.356
--- doc/invoke.texi 1 Nov 2003 15:49:08 -0000
*************** The @option{-finline-limit=@var{n}} opti
*** 3829,3836 ****
as follows:
@table @gcctabopt
- @item max-inline-insns
- is set to @var{n}.
@item max-inline-insns-single
is set to @var{n}/2.
@item max-inline-insns-auto
--- 3829,3834 ----
*************** as follows:
*** 3841,3848 ****
is set to @var{n}.
@end table
! Using @option{-finline-limit=600} thus results in the default settings
! for these parameters. See below for a documentation of the individual
parameters controlling inlining.
@emph{Note:} pseudo instruction represents, in this particular context, an
--- 3839,3845 ----
is set to @var{n}.
@end table
! See below for a documentation of the individual
parameters controlling inlining.
@emph{Note:} pseudo instruction represents, in this particular context, an
*************** by the compiler will be investigated. T
*** 4776,4792 ****
be applied.
The default value is 150.
- @item max-inline-insns
- The tree inliner does decrease the allowable size for single functions
- to be inlined after we already inlined the number of instructions
- given here by repeated inlining. This number should be a factor of
- two or more larger than the single function limit.
- Higher numbers result in better runtime performance, but incur higher
- compile-time resource (CPU time, memory) requirements and result in
- larger binaries. Very high values are not advisable, as too large
- binaries may adversely affect runtime performance.
- The default value is 200.
-
@item large-function-insns
The limit specifying really large functions. For functions greater than this
limit inlining is constrained by @option{--param large-function-growth}.
--- 4773,4778 ----
*************** For languages that use the RTL inliner (
*** 4810,4816 ****
than tree inlining), you can set the maximum allowable size (counted
in RTL instructions) for the RTL inliner with this parameter.
The default value is 600.
-
@item max-unrolled-insns
The maximum number of instructions that a loop should have if that loop
--- 4796,4801 ----