[parisc-linux] Re: hppa64-...-gcc-4.1 annoying pb?

John David Anglin dave at hiauly1.hia.nrc.ca
Thu May 4 11:54:55 MDT 2006


> On Thu, May 04, 2006 at 12:35:32PM -0400, John David Anglin wrote:
> > Suggests that 4.1 has gone wild inlining.  To some extent, inlining
> > depends on the amount of memory present in the build machine.
> >
> 
> This is kind of a ridiculous assumption to make... Is there a way to
> disable it? 

Maybe, but I've seen it before.  With the default inline limits, the
program took more than 24 hours to compile.  With reduced limits, the
time was about 60 seconds.  Given that the complilation actually
succeeded, there's little else that can change compilation time in
such a dramatic manner.  If it's not inlining, there are various
other optimizations that can be disabled (e.g., -fno-loop-optimize).

It possible to get an indication as to where the problem lies by
running cc1 without -quiet.  This shows the elapsed time for each
pass at the end of the compilation.   You can see how to run cc1
for the compilation in question by using the -v option with gcc.

There's various options that change inlining behavior.

  -finline-limit=<number> Limits the size of inlined functions to <number>
  -finline-functions      Integrate simple functions into their callers

Inlining can be turned off using -fno-inline-functions.

The following change the model used for inlining:

  --param max-inline-insns-rtl=<value> The maximum number of instructions for the RTL inliner
  --param min-inline-insns=<value>     The number of instructions in a single functions still eligible to inlining after a lot recursive inlining
  --param max-inline-slope=<value>     The slope of the linear function throttling inlining after the recursive inlining limit has been reached is given by the negative reciprocal value of this parameter
  --param max-inline-insns=<value>     The maximum number of instructions by repeated inlining before gcc starts to throttle inlining
  --param max-inline-insns-auto=<value> The maximum number of instructions when automatically inlining
  --param max-inline-insns-single=<value> The maximum number of instructions in a single function eligible for inlining

In the above, the number of instructions refers to RTL instructions
rather than machine instructions.  The default settings are in the manual.

Dave
-- 
J. David Anglin                                  dave.anglin at nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)



More information about the parisc-linux mailing list