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]

obvious REG_BR_PRED note removal fix


Hi
the REG_BR_PRED note removal code is wrong - it always remove just the first one.

Thu Jun 14 11:26:08 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* predict.c (combine_predictions_for_insn): Fix note removal code.
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
*************** combine_predictions_for_insn (insn, bb)
*** 208,214 ****
       probability combination techniques.  */
    while (*pnote)
      {
-       rtx *next_pnote = &XEXP (*pnote, 1);
        if (REG_NOTE_KIND (*pnote) == REG_BR_PRED)
  	{
  	  int predictor = INTVAL (XEXP (XEXP (*pnote, 0), 0));
--- 208,213 ----
*************** combine_predictions_for_insn (insn, bb)
*** 219,225 ****
  	    best_probability = probability, best_predictor = predictor;
  	  *pnote = XEXP (*pnote, 1);
  	}
!       pnote = next_pnote;
      }
    dump_prediction (PRED_FIRST_MATCH, best_probability, bb);
    if (!prob_note)
--- 218,225 ----
  	    best_probability = probability, best_predictor = predictor;
  	  *pnote = XEXP (*pnote, 1);
  	}
!       else
!         pnote = &XEXP (*pnote, 1);
      }
    dump_prediction (PRED_FIRST_MATCH, best_probability, bb);
    if (!prob_note)


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