This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -finline-functions tuning (Using on ET)
> > # /opt/gcc3/bin/g++ -O3 -finline-limit=3000 -I. ray.cc -S
> >
> > ----8<----
> [46 lines of rather good code deleted]
> > ---->8----
> >
> > Some indirect calls are still there (but better code than before).
>
> You mean indirect access, don't you?
Yep,
> I'd say that this result is acceptable, though I wonder why the 2.96 code
> looked slightly better.
> I don't think the inliner makes the difference for this.
>
> > # /opt/gcc/bin/g++ -O2 -finline-limit=3000 -I. ray.cc -S
> ^^^^^^^^^^^^^^^^ ^
> > doesn't make any difference related to reflect. The inline-limit seems
> > to between 1500 and 2000 for this case. Your ideas I haven't checked yet.
>
> 2.95.x did not understand -finline-limit=X but only -finline-limit-X
> > # /opt/gcc/bin/g++ -O2 -finline-limit=3000 -I. ray.cc -S
> ^^ ^
> > # /opt/gcc/bin/g++ -O2 -fkeep-inline-functions -I. ray.cc -S
>
> That's 2.95 again, isn't it?
> [2.95.3 code deleted].
Damn, the copy&paste devel....
Today, once more.....
> Could you check how far you have to increase the inline-limit with 3.0.1 and
> patch v3, please, to get acceptable code? (The gcc-inline-func-acct-v1.diff
> is irrelevant in your case, AFAICT, but should of course also not do any
> harm. It just throttles inlining for -finline-functions selected functions
> a bit more than for inline declared ones.)
Yes.
BTW, on hpux, the cc knows the option +Onolimit. Maybee we can adapt this like
-fno-limits for gcc/g++ ???
> I guess, the Blitz code expands to a number of statements > 1 again and
> again and in the end we end up lowering the limit because we think we've
> been doing too much inlining. In the end the code collapses to only very
> few assembly instructions.
Yes, the idea is to use the templates to evaluate at compile time recursive. At
end, we have a kind of loop unrolling using templates, see
<http://extreme.indiana.edu/~tveldhui/papers/Expression-Templates/exprtmpl.html>.
A small compileable example is on the top. This shows the principle in short.
Regards
Olaf