This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: docs. on -fno-guess-branch-probability

> From: Dave Fladebo <>
> To:
> Date: Tue, 7 May 2002 13:26:33 -0500

> I recently came across a section of the docs. for gcc that was initially a bit 
> confusing to me and would like to propose a change.

> -fno-guess-branch-probability
> Depending on other optimization switch settings and source code, gcc may use 
> built-in branch probability optimization heuristics when information is not 
> available from either profile directed feedback (`-fprofile-arcs') or 
> (`__built-in_expect'). In a hard real-time system, it may be highly desirable 
> that source code with the same logical result [e.g.: if(x <= y) func1(); else 
> func2(); changed to if(x > y) func2(); else func1();] cause the generation of 
> executable code that performs the same, minimizing the possibility of 
> differences being introduce by branch prediction optimizations, even if this 
> may result in slower runtime performance. This switch instructs the compiler 
> to not use the built-in branch probability optimization heuristics.

I think it is worse.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]