Re: [proaudio] gcc cflags

[ Thread Index | Date Index | More lists.tuxfamily.org/proaudio Archives ]


Le Thu, 31 Aug 2006 00:04:04 +0200,
Dominique Michel <dominique.michel@xxxxxxxxxxxx> a écrit :

> It begin to become clearer. I found a good thread at
> http://forums.gentoo.org/viewtopic-t-318191-highlight-.html
> 
> It seam at -fomit-frame-pointer will speedup the code on x86, because
> it is not enable by default (it make debugging impossible).
> 
> -momit-leaf-frame-pointer seam to be safe too.
> 
> -fno-ident is not an optimisation flag, but it remove some useless
> repeated version strings, and it is safe.
> 
> -fweb seam to not do much, but doesn't break anything.
> 
> -ffast-math can have really good effect on audio/video decoders, but don't
> use it as global CFLAGS.
> 
> -ftracer: I am 100% not sure about it. Seam to be a good thing.
> 
> -ftree-vectorize seam to be good too.
> 
> So, I thing at I will try with:
> CFLAGS="-O2 -march=pentium4 -pipe -fweb -ftracer -ftree-vectorize
> -fomit-frame-pointer -momit-leaf-frame-pointer -fno-ident"
> 
> CXXFLAGS="${CFLAGS}"
> 
> LDFLAGS="-Wl,-O1 -Wl,--sort-common"
> 
> BTW, gcc-4.1 go stable just now.
> 
> Dominique
> 

It was a nice try, but the result was an unusable system. So I went back to
Thomas first suggestion and use only safe flags now. I get an answer here:
http://forums.gentoo.org/viewtopic-t-318191-start-36.html?sid=aca39367d441b6292798907038bc5f2e
but it was already too late.

In short, -fforce-addr in not a good idea on x86 and gcc-4+
-ftree-vectorize is buggy and -momit-leaf-frame-pointer cause problem with some
ebuilds.

I post this just for info if someone read this thread an want to use the same
flags: they don't work, even gdm was crashing.

Ciao,
Dominique

>  Le Thu, 24
> Aug 2006 17:17:19 +0200, Dominique Michel
> <dominique.michel@xxxxxxxxxxxx> a écrit :
> 
> > Thank you,
> > The vectorize flags are for loop optimisation. I read on the IBM website
> > at they can increase the speed of a program by a factor of 20. But I
> > read in another website at all depend of the size of the loop, because
> > they append additional structure control to the code, and at in case of
> > small loops, those additional structures will do the resulting program
> > slower.
> > 
> > I think at it will be a good flag to have with math intensive programs
> > as multimedia programs, but I am not sure at it is a good flag to have
> > as a system flag. Do you know something about this issue?
> > 
> > On Wed, 23 Aug 2006 16:20:18 -0500
> > "Reuben Martin" <reuben.m@xxxxxxxxx> wrote:
> > 
> > > Based on how agressive you seem to want to be, I would recommend:
> > > 
> > > CFLAGS="-O2 -march=pentium4 -pipe -ftracer -fweb -ftree-vectorize"
> > > 
> > > The -ftree-vectorize does wonders.
> > > 
> > > If you are still feeling like you want to push it a little harder you
> > > can try changing -O2 to -O3 and adding -ffast-math. Some things don't
> > > work well with -O3 though (some of the LADSPA plugins don't work right
> > > with -O3) and some programs don't work correctly with -ffast-math.
> > > (for instance OpenOffice will fail to compile if Python has been built
> > > with -ffast-math turned on)
> > > 
> > > -Reuben
> > > 
> > 
> > I don't use -ffast-math and don't want it. I have no problem at this
> > time with -O3 and -fforce-addr, and that even to compile the LADSPA
> > plugin or openoffice. The only problem is at the resulting code is
> > bigger as with -O2 alone and at it seam to be not faster. I
> > try to remove the -fforce-addr and tested it with the nec2 antenna
> > simulation software. It was faster as with -O2 alone, but I get wrong
> > simulation results in some cases. So I thing at I will get with -O2 in
> > the future, -O3 is not a good option is you have to remove the speed
> > benefice of that option in order to get a correct code with all the
> > programs. And I don't have the time to test my flags with every one
> > program that I want to install.
> > 
> > Cheers,
> > Dominique
> > 
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/