+2014-08-22 David Malcolm <dmalcolm@redhat.com>
+
+ * predict.h (predict_insn_def): Strengthen param "insn" from rtx
+ to rtx_insn *.
+
+ * function.c (stack_protect_epilogue): Add checked cast to
+ rtx_insn for now when invoking predict_insn_def.
+
+ * predict.c (predict_insn): Strengthen param "insn" from rtx to
+ rtx_insn *.
+ (predict_insn_def): Likewise.
+ (rtl_predict_edge): Likewise for local "last_insn".
+ (can_predict_insn_p): Strengthen param "insn" from const_rtx to
+ const rtx_insn *.
+ (combine_predictions_for_insn): Strengthen param "insn" from rtx
+ to rtx_insn *.
+ (bb_estimate_probability_locally): Likewise for local "last_insn".
+ (expensive_function_p): Likewise for local "insn".
+
+ * config/cris/cris.c (cris_emit_trap_for_misalignment): Likewise for
+ local "jmp", since this is used when invoking predict_insn_def.
+
2014-08-22 Marek Polacek <polacek@redhat.com>
PR c++/62199
static sreal real_zero, real_one, real_almost_one, real_br_prob_base,
real_inv_br_prob_base, real_one_half, real_bb_freq_max;
-static void combine_predictions_for_insn (rtx, basic_block);
+static void combine_predictions_for_insn (rtx_insn *, basic_block);
static void dump_prediction (FILE *, enum br_predictor, int, basic_block, int);
static void predict_paths_leading_to (basic_block, enum br_predictor, enum prediction);
static void predict_paths_leading_to_edge (edge, enum br_predictor, enum prediction);
-static bool can_predict_insn_p (const_rtx);
+static bool can_predict_insn_p (const rtx_insn *);
/* Information we hold about each branch predictor.
Filled using information from predict.def. */
}
static void
-predict_insn (rtx insn, enum br_predictor predictor, int probability)
+predict_insn (rtx_insn *insn, enum br_predictor predictor, int probability)
{
gcc_assert (any_condjump_p (insn));
if (!flag_guess_branch_prob)
/* Predict insn by given predictor. */
void
-predict_insn_def (rtx insn, enum br_predictor predictor,
+predict_insn_def (rtx_insn *insn, enum br_predictor predictor,
enum prediction taken)
{
int probability = predictor_info[(int) predictor].hitrate;
void
rtl_predict_edge (edge e, enum br_predictor predictor, int probability)
{
- rtx last_insn;
+ rtx_insn *last_insn;
last_insn = BB_END (e->src);
/* We can store the branch prediction information only about
At the moment we represent predictions only on conditional
jumps, not at computed jump or other complicated cases. */
static bool
-can_predict_insn_p (const_rtx insn)
+can_predict_insn_p (const rtx_insn *insn)
{
return (JUMP_P (insn)
&& any_condjump_p (insn)
note if not already present. Remove now useless REG_BR_PRED notes. */
static void
-combine_predictions_for_insn (rtx insn, basic_block bb)
+combine_predictions_for_insn (rtx_insn *insn, basic_block bb)
{
rtx prob_note;
rtx *pnote;
static void
bb_estimate_probability_locally (basic_block bb)
{
- rtx last_insn = BB_END (bb);
+ rtx_insn *last_insn = BB_END (bb);
rtx cond;
if (! can_predict_insn_p (last_insn))
limit = ENTRY_BLOCK_PTR_FOR_FN (cfun)->frequency * threshold;
FOR_EACH_BB_FN (bb, cfun)
{
- rtx insn;
+ rtx_insn *insn;
FOR_BB_INSNS (bb, insn)
if (active_insn_p (insn))