int probability = INTVAL (XEXP (XEXP (note, 0), 1));
found = true;
- if (best_predictor > predictor)
+ if (best_predictor > predictor
+ && predictor_info[predictor].flags & PRED_FLAG_FIRST_MATCH)
best_probability = probability, best_predictor = predictor;
d = (combined_probability * probability
use no_prediction heuristic, in case we did match, use either
first match or Dempster-Shaffer theory depending on the flags. */
- if (predictor_info [best_predictor].flags & PRED_FLAG_FIRST_MATCH)
+ if (best_predictor != END_PREDICTORS)
first_match = true;
if (!found)
combined_probability, bb);
else
{
- dump_prediction (dump_file, PRED_DS_THEORY, combined_probability,
- bb, !first_match ? REASON_NONE : REASON_IGNORED);
- dump_prediction (dump_file, PRED_FIRST_MATCH, best_probability,
- bb, first_match ? REASON_NONE : REASON_IGNORED);
+ if (!first_match)
+ dump_prediction (dump_file, PRED_DS_THEORY, combined_probability,
+ bb, !first_match ? REASON_NONE : REASON_IGNORED);
+ else
+ dump_prediction (dump_file, PRED_FIRST_MATCH, best_probability,
+ bb, first_match ? REASON_NONE : REASON_IGNORED);
}
if (first_match)
found = true;
/* First match heuristics would be widly confused if we predicted
both directions. */
- if (best_predictor > predictor)
+ if (best_predictor > predictor
+ && predictor_info[predictor].flags & PRED_FLAG_FIRST_MATCH)
{
struct edge_prediction *pred2;
int prob = probability;
use no_prediction heuristic, in case we did match, use either
first match or Dempster-Shaffer theory depending on the flags. */
- if (predictor_info [best_predictor].flags & PRED_FLAG_FIRST_MATCH)
+ if (best_predictor != END_PREDICTORS)
first_match = true;
if (!found)
dump_prediction (dump_file, PRED_NO_PREDICTION, combined_probability, bb);
else
{
- dump_prediction (dump_file, PRED_DS_THEORY, combined_probability, bb,
- !first_match ? REASON_NONE : REASON_IGNORED);
- dump_prediction (dump_file, PRED_FIRST_MATCH, best_probability, bb,
- first_match ? REASON_NONE : REASON_IGNORED);
+ if (!first_match)
+ dump_prediction (dump_file, PRED_DS_THEORY, combined_probability, bb,
+ !first_match ? REASON_NONE : REASON_IGNORED);
+ else
+ dump_prediction (dump_file, PRED_FIRST_MATCH, best_probability, bb,
+ first_match ? REASON_NONE : REASON_IGNORED);
}
if (first_match)