In a program that does a lot of template metaprogramming stuff, I
have a function
that I need to be inlined. The resulting code (when inlining happens)
is very short
(about 10-20 instructions), but I have no idea of the complexity of
functions the
compiler is exposed to.
Now the fun thing: documentation says that the default for -finline-
limit is 600
and that's the number of ops (in the RTL, I presume).
What happens is that compiling without -finline-limit (gcc 4.1.1)
doesn't inline
my function, but compiling w/ almost any setting (including much
below the default of 600)
does inline succesfully.
Specifically, I have to go down to -finlinel-imit=60 to fail to
inline and -finline-limit=65
does inline succesfully).
Now I kind of remember from mailing lists a couple of years ago (but
couldn't find
the threads) that the scale for something (possibly -finline-limit)
was changed
(and the factor of 10 and the number 600 kind of resonate).
Anybody to comment?
It is possible that the docs are wrong and the default is now 60?
Thanks,
Maurizio