Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
branch target load opt ...not intended to be run twice
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1896
Location: Switzerland (Romandie)

PostPosted: Wed Aug 30, 2006 1:40 pm    Post subject: Reply with quote

Thank you for the informations on this thread.
I have now the following flags:
Code:
CFLAGS="-O3 -march=pentium4 -pipe -fomit-frame-pointer -fforce-addr -fno-ident -ftracer"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
That's with gcc 3.4.6. The result is a very stable system, the -fforce-addr is doing good with -O3, but the problem I get with it is at the resulting code is not faster as with -O2 alone, and still is bigger and take more time to compile. So I will get back to -O2, because I just don't have the time to test all my program to know when it is safe to use -O3 without -fforce-addr, and when I must add -fforce-addr. I done the test with the nec2 antenna simulation software (not in portage), and -O2 is just better because it will compile faster and load faster as the same program compiled with -O3 -fforce-addr.

The main uses for my box are audio and electronic simulation. I am planing to change my flags at the same time at I will upgrade to gcc4.
It is a few new flags with gcc, but it is hard to find reliable information about what they are doing. As exemple, about -ftree-vectorize, we can read in the gcc4.1 manual:
Quote:
-ftree-vectorize
Perform loop vectorization on trees.
It is not much. This option is not in any -O flag, and it is no warning of any kind. I thing at it will be safe and at it can be a good thing to have on a system that use audio and scientific program. I am thinking to use something as
Code:
CFLAGS="-O2 -march=pentium4 -pipe -fweb -ftree-vectorize -fomit-frame-pointer -momit-leaf-frame-pointer -fno-ident"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
Will it be safe as main use flags?
I removed -fvisibility-inlines-hidden from my CXXFLAGS (I can confirm at it break things.). Will it be safe to add it with gcc4.1, or will it be the same problems as with gcc3.4? What about -ftracer and gcc4.1?
_________________
"Confirm You are a robot." - the singularity
Back to top
View user's profile Send private message
Eduard Munteanu
n00b
n00b


Joined: 06 Sep 2006
Posts: 20
Location: Bucuresti, Romania

PostPosted: Sun Sep 10, 2006 11:07 pm    Post subject: Reply with quote

moocha, using -momit-leaf-frame-pointer is useless with -fomit-frame-pointer:
man gcc (4.1.1-r1) wrote:
-momit-leaf-frame-pointer
Don't keep the frame pointer in a register for leaf functions.
This avoids the instructions to save, set up and restore frame
pointers and makes an extra register available in leaf functions.
The option -fomit-frame-pointer removes the frame pointer for all
functions which might make debugging harder.

Also, -march implies -mtune, so there is no reason to use both.
Back to top
View user's profile Send private message
Dominique_71
Veteran
Veteran


Joined: 17 Aug 2005
Posts: 1896
Location: Switzerland (Romandie)

PostPosted: Mon Sep 11, 2006 1:10 pm    Post subject: Reply with quote

I try the flag as in my first messages, but the result was an unusable system. Only xdm and fluxbox was starting, but a lot of other program was just crashing: fluxconf, fluxmenu, gdm, xfce and many more. So I went back to safer flags.
_________________
"Confirm You are a robot." - the singularity
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Tue Sep 12, 2006 1:31 am    Post subject: Reply with quote

-fforce-addr - not a good idea with GCC 4 and x86. x86 already has a horribly limited number of registers, and using more will just increase register pressure, resulting in poorer code. packages that use a lot of hand-made assembly, (eg. ffmpeg, mplayer, transcode) can fail with this flag. same with -frename-registers and -fforce-mem

-ftree-vectorize - still buggy with GCC 4.1 and not improving in 4.2. there's a large number of vectorizer patches that should have gone into 4.2 but were deferred til 4.3 due to lack of proper review. =/ http://tinyurl.com/z79jz

-ftree-loop-linear - ditto, but without the forthcoming patches. don't use this unless you like internal compiler errors. http://tinyurl.com/msfnf

-momit-leaf-frame-pointer - sounds good, but i know there's more than a couple ebuilds that have to filter it to build. (eg. xine-lib, ffmpeg)
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
Dr.Dran
l33t
l33t


Joined: 08 Oct 2004
Posts: 766
Location: Imola - Italy

PostPosted: Tue Sep 12, 2006 4:49 pm    Post subject: Reply with quote

Hi at all!!!

@dirtyepic I will show you my CFLAGS configuration and LDFLAG (I have a VIA C7 Easter core):

Code:
CFLAGS="-O2 -march=i686 -mmmx -msse -msse2 -msse3 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-ident -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"


Does that configuration look good for the system? Fon now I haven't notice any serious problem...

Best regards

Franco Tampieri
_________________
:: [Dr.Dran] Details ::
- Linux User # 286282
- IT FreeLance Consultant
- President of ImoLUG [Imola & Faenza Linux User Group]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum