This mail applies to g++ 4.5.2 running on 64bit linux
uname -a:
Linux NAME 2.6.9-89.ELsmp #1 SMP Mon Apr 20 10:33:05 EDT 2009 x86_64
x86_64 x86_64 GNU/Linux
I remember nearly 3 years ago g++ took 1hour and 4GB of memory to
compile some of my functions. And the generated code was exceptionally good!
This is not the case anymore -- I don't know since when.
Today I only get good code for small toy examples.
I used the -Wdisabled-optimization and used some parameter settings to
get around this
-- but without result:
g++ -fPIC -shared -DNDEBUG -O3 -march=native -I
/home/peterf/boost_1_47_0 -std=c++0x --param max-gcse-memory=1073741824
mosfet0.c -Wdisabled-optimization
One problem is that the copy constructor is really being expressed.
I was already thinking that some idiot at my company
changed the compiler to default to -fno-elide-constructors.
Another problem is that many operations are done on the stack instead of
between registers.
I'm talking about floating point operations with double.
Too many of the following operations:
movapd
movaps
movddup
movq
Anybody any clue?
Thanks
Peter