This is the mail archive of the gcc-patches@gcc.gnu.org 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]

branch prediction analyzis improvement


Hi
In case instruction do have REG_BR_PROB note, some predictors are not run,
then they are missing in the summary from analyze_brprob script.

It seems to me that it is not problem to make them run unconditionally. The opcode
and pointer heuristic is cheap so in average case it may even be more expensive
to seach for the note.


Thu Jun 14 11:26:08 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* predict.c (estimate_probability): Do not bail out early
	when note is present.

Index: predict.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/predict.c,v
retrieving revision 1.19
diff -c -3 -p -r1.19 predict.c
*** predict.c	2001/06/10 08:01:57	1.19
--- predict.c	2001/06/14 09:22:01
*************** estimate_probability (loops_info)
*** 311,319 ****
  
        if (GET_CODE (last_insn) != JUMP_INSN
  	  || ! any_condjump_p (last_insn))
- 	continue;
- 
-       if (find_reg_note (last_insn, REG_BR_PROB, 0))
  	continue;
  
        for (e = bb->succ; e; e = e->succ_next)
--- 311,316 ----


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