disabling branch probability guessing (patch)

Aldy Hernandez aldyh@redhat.com
Tue Jan 16 18:54:00 GMT 2001


On Mon, Jan 15, 2001 at 03:09:12PM -0800, Richard Henderson wrote:
> On Mon, Jan 15, 2001 at 07:07:04PM -0400, Aldy Hernandez wrote:
> >   -fsingle-precision-constant  -fssa
> >   -fstrength-reduce  -fstrict-aliasing  -fthread-jumps  -ftrapv
> >   -funroll-all-loops  -funroll-loops 
> > + -fguess-branch-probability
> 
> This list is alphabetaized.  Moreover, I think you should
> document the "-fno-" form.
> 
> > + @item -fguess-branch-probability
> > + Enable guessing of branch probabilities.
> 
> ... and generally discuss what branch probabilities are,
> and why why one might want to disable such a thing.

here it is.
ok?

aldy

2001-01-16  Aldy Hernandez  <aldyh@redhat.com>

	* gcc/invoke.texi (-fno-guess-branch-probability): New option.

Index: invoke.texi
===================================================================
RCS file: /cvs/gcc/egcs/gcc/invoke.texi,v
retrieving revision 1.262
diff -c -r1.262 invoke.texi
*** invoke.texi	2001/01/11 18:37:17	1.262
--- invoke.texi	2001/01/17 02:38:25
***************
*** 249,255 ****
  -finline-functions  -finline-limit=@var{n}  -fkeep-inline-functions
  -fkeep-static-consts  -fmove-all-movables
  -fno-default-inline  -fno-defer-pop
! -fno-function-cse  -fno-inline  -fno-math-errno  -fno-peephole
  -fomit-frame-pointer  -foptimize-register-move
  -foptimize-sibling-calls  -freduce-all-givs
  -fregmove  -frename-registers
--- 249,256 ----
  -finline-functions  -finline-limit=@var{n}  -fkeep-inline-functions
  -fkeep-static-consts  -fmove-all-movables
  -fno-default-inline  -fno-defer-pop
! -fno-function-cse  -fno-guess-branch-probability  -fno-inline 
! -fno-math-errno  -fno-peephole
  -fomit-frame-pointer  -foptimize-register-move
  -foptimize-sibling-calls  -freduce-all-givs
  -fregmove  -frename-registers
***************
*** 3090,3095 ****
--- 3091,3104 ----
  branch is mostly to take, the @samp{REG_BR_PROB} values are used to
  exactly determine which path is taken more often.
  @end ifset
+ 
+ @item -fno-guess-branch-probability
+ Sometimes gcc will opt to guess branch probabilities when none are
+ available from either profile directed feedback (@samp{-fprofile-arcs})
+ or @samp(__builtin_expect).  It is sometimes desirable to have a program
+ behave in a more deteministic way (real-time systems, for example).  In
+ these cases, use @samp{-fno-guess-branch-probability} to keep gcc from
+ guessing branch probabilities.
  
  @item -fstrict-aliasing
  Allows the compiler to assume the strictest aliasing rules applicable to


More information about the Gcc-patches mailing list