This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Expression templates (ET) and optimizer for C++
On Wed, Aug 29, 2001 at 08:44:43AM +0200, Olaf Petzold wrote:
> > First question: Is this with version 1 or 2 of my patch?
> (I guess) the 2nd, see <http://gcc.gnu.org/ml/gcc/2001-08/msg01087.html>.
That's v2.
> As I can see there is no 3rd, see Gerald's notes concerning the texinfo
> file in <http://gcc.gnu.org/ml/gcc/2001-08/msg01135.html>.
It's a mail from Manfred. I'll fix that in v3.
> > In that case, I got some ideas:
[...]
> > Can you try those two changes? Just change the min_inline resp. the
> > max_curr in gcc/cp/optimize.c: inlinable_function_p () accordingly.
> I will do it hopefully the next days - compiling all languages takes a lot of
> time (about 5 h?) on my AMD K6-2/400, so I will enable only c++ at home in
> the evening.
Thanks to SuSE, I got some pretty fast machines myself and access to a
number of others, so if you have code for me to perform tests, that's no
problem. (If you need, I could also produce RPMs for SuSE Linux.)
> > Did you compile with -finline-functions aka -O3?
> Some days there where options like -O6 in some newsgroups ... - I did try this
> as well (to get the hidden secrets 8)
>
> > Please also check without then.
> That I can't do on ET. I need at least -O to evaluate the ET!
When I say without -O3, I mean -O2.
> > -O2 always yields better results, if the author of the code did use
> > the inline keyword at all the appropriate places and I suspect Todd did.
> I would say yes. He spend a lot of time for those imho. If I see other ET
> implementations .... At moment I write my own implementation of vector matrix
> et lib.
Then this link may be interesting for you. I just did not yet write a
publication about using the Temporary Base Class Idiom, but the code is in
place since some time and working well:
http://pebbles.e-technik.uni-dortmund.de/numlib/
> There are some other cute effects. Todd it's using a bool member
> function like has_fastAccess which is for Tiny math always true. I don't need
> this flag but, even with this flag the produced code is better (on
> gcc-2.96-mandrake)!
Well, it might be known at compile time, so you don't lose anything (except
for space, maybe)
> > Another question: Did you compare against 2.95.3, 3.0 and 3.0.1?
> > I'd like to be sure to not introduce regressions ...
> Only the produced x86-asm code, compared 2.95.3 and 3.01-with-patch. I will
> make more deep/comparable results even with details.
Would be nice!
> > Note that 2.96/97 do just do recursive inlining without limitations. Want
> > some little test code to have your compiler trigger OOM of your machine?
> Yes but, what's OOM?
Oh, I'm normally not hacking gcc, but the Linux kernel. OOM = Out Of Memory.
A problem, that is harder to handle for the kernel than one might think on
first sight.
Regards,
--
Kurt Garloff <kurt@garloff.de> [Eindhoven, NL]
Physics: Plasma simulations <K.Garloff@Phys.TUE.NL> [TU Eindhoven, NL]
Linux: SCSI, Security <garloff@suse.de> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)
PGP signature