branch prediction analyzis improvement

Jan Hubicka jh@suse.cz
Thu Jun 14 03:03:00 GMT 2001


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 ----



More information about the Gcc-patches mailing list