+2016-05-31 Jan Hubicka <hubicka@ucw.cz>
+
+ * predict.def (PRED_LOOP_EXTRA_EXIT): Define.
+ * predict.c (predict_iv_comparison): Also check PRED_LOOP_EXTRA_EXIT.
+ (predict_extra_loop_exits): Use PRED_LOOP_EXTRA_EXIT instead of
+ PRED_LOOP_EXIT.
+
2016-05-31 Jan Hubicka <hubicka@ucw.cz>
* doc/invoke.texi (-frename-registers): Drop -fpeel-loops from list
if (predicted_by_p (bb, PRED_LOOP_ITERATIONS_GUESSED)
|| predicted_by_p (bb, PRED_LOOP_ITERATIONS)
- || predicted_by_p (bb, PRED_LOOP_EXIT))
+ || predicted_by_p (bb, PRED_LOOP_EXIT)
+ || predicted_by_p (bb, PRED_LOOP_EXTRA_EXIT))
return;
stmt = last_stmt (bb);
The edge BB7->BB8 is loop exit because BB8 is outside of the loop.
From the dataflow, we can infer that BB4->BB6 and BB5->BB6 are also loop
exits. This function takes BB7->BB8 as input, and finds out the extra loop
- exits to predict them using PRED_LOOP_EXIT. */
+ exits to predict them using PRED_LOOP_EXTRA_EXIT. */
static void
predict_extra_loop_exits (edge exit_edge)
continue;
if (EDGE_COUNT (e->src->succs) != 1)
{
- predict_paths_leading_to_edge (e, PRED_LOOP_EXIT, NOT_TAKEN);
+ predict_paths_leading_to_edge (e, PRED_LOOP_EXTRA_EXIT, NOT_TAKEN);
continue;
}
FOR_EACH_EDGE (e1, ei, e->src->preds)
- predict_paths_leading_to_edge (e1, PRED_LOOP_EXIT, NOT_TAKEN);
+ predict_paths_leading_to_edge (e1, PRED_LOOP_EXTRA_EXIT, NOT_TAKEN);
}
}
DEF_PREDICTOR (PRED_LOOP_EXIT, "loop exit", HITRATE (91),
PRED_FLAG_FIRST_MATCH)
+/* Edge causing loop to terminate by computing value used by later conditional.
+ */
+DEF_PREDICTOR (PRED_LOOP_EXTRA_EXIT, "extra loop exit", HITRATE (91),
+ PRED_FLAG_FIRST_MATCH)
+
/* Pointers are usually not NULL. */
DEF_PREDICTOR (PRED_POINTER, "pointer", HITRATE (85), 0)
DEF_PREDICTOR (PRED_TREE_POINTER, "pointer (on trees)", HITRATE (85), 0)
+2016-05-31 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.d/predict-lop-exit-1.C: Update template for new predictor name.
+ * g++.d/predict-lop-exit-2.C: Update template for new predictor name.
+ * g++.d/predict-lop-exit-2.C: Update template for new predictor name.
+
2016-05-31 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71248