Re: [proaudio] gcc cflags |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/proaudio Archives
]
- To: proaudio@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [proaudio] gcc cflags
- From: Dominique Michel <dominique.michel@xxxxxxxxxxxx>
- Date: Tue, 12 Sep 2006 17:23:30 +0200
- Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEXy8ubtkoXo7+b1+fbN cGKCeWDtamweFA8eMkmKPkPtvcWRoqyV0Pn7AAACbElEQVQ4jXXTMWvbQBQA4MOlizsdXEXp KAi09mKcLZ0EJxONDRJVkikg9AtqTm63gtHDmVJs1GsnC0JiaTMJGN2f67uzznJb+gZj9PFO 7717IqdtvCAmem4bxMLp/2BEyEBF1+U/0H8uhI6rv+BVLNrY/gH9T0L8yAxk2yMY3YuZxDCn TY/gpBByyTGktIcZOIvFjPNJmqYJDwrx3cIoBrE0zzG4FF8tfBAwM+DonKCYWjgROZ6Upjcm 5Qje58JAmlKKGfIAjzaDUuogZBY2Bjg14eDbywMIqZvwqgqFBcVFB0seYONLb00ZZlh4p0F6 FHNoUMyKAzxowJSQTyj+XloYs3MN3GeMpzyYSTMshLM00ODpWlPp4SDbqs4cViDcGAgmlK/a PsaOg7DvIQ3wzANMqB/iQW/XTkoTLO6XhSeHUoQKe+NLjyY/Ldx7CW2D4WTYhZ3V0GP64RpP Q/E66IUWMLj3+nDn4w2ejMACyXFeHZy6ETcZehc49bv1GQ/0bazNuzm97mDkhnoie9i30WYM w/YCnYT7Fx308s98n0IT//Jod1+aOzdzYXLVbftol+PC+REG3u+0AxdEtuSMB6G+DLGwMH4E vXGmJn8VCLM9LhmrOAMQYt5Wi/DFgIC52iFkUzMpDVmjAaDZRGC+JGwDqzJ/G5fUUcWZAaE7 YfvPLYtIU1Wb4A2IeS7uDMgcIFutiCr766qGfKHyuxvTIERKXVNSN27lDgCuBuojlpxIyJV6 ritS1uWWuHF2Ww7qcIKbqEFVNbmtmm3vGSCHbVXjikrY3SpVxwQWw2aIjwG+ueXTJDmHeK6a HfwGyU5ZSlGeSRQAAAAASUVORK5CYII=
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
> >
>